* PM to attend Brussels summit after securing trade talks
* Government lost awkward Brexit vote in parliament
* May now needs cabinet consensus on new EU relationship
* Pro-Brexit UK lawmakers fear weaker negotiating stance (Adds Tusk comments, May's spokesman)
BRUSSELS, Dec 14 (Reuters) - British Prime Minister Theresa May will urge European Union leaders on Thursday to approve an agreement to move Brexit talks on to a second phase, hours after an embarrassing parliamentary defeat at home that weakens her hand.
At the beginning of a dinner in Brussels, May will repeat her case for unlocking talks to unravel more than 40 years of union to allow for the discussion of future trade relations, which she sees as crucial to offering certainty for businesses.
The 27 other EU leaders are all but certain to approve the deal to move to second phase on Friday, after May has left Brussels, launching a new stage of talks that could be hampered by divisions at home and differences with the EU.
Acknowledging the tough negotiations ahead, Donald Tusk, chairman of the EU leaders, warned them that only their unity displayed so far in the Brexit talks would deliver a good deal.
"I have no doubt that the real test of our unity will be the second phase of Brexit talks," Tusk told reporters in Brussels.
A senior British government official said that the prime minister would press for a quick agreement on a transition deal to allow businesses to adapt to life after Brexit.
"The prime minister will say that reaching the agreement on phase one has required give and take on both sides but a fair outcome has been achieved," the official told reporters.
Phase one covered Britain's bill to the EU, the border with Ireland and the status of EU citizens in Britain.
After days of often fraught diplomacy, May rescued the initial deal last Friday, easing the concerns of her Northern Irish allies over the wording to protect a free border with EU member Ireland without separating the province from the UK.
Then, EU negotiators said the talks had made "sufficient progress", a recommendation that will, barring accidents, be blessed by the leaders of the other member states.
Her success has won her some respite at home from political infighting between enthusiasts and sceptics of Brexit in her ruling party, and has reduced the prospect of a disorderly departure from the bloc.
But there are hurdles still to negotiate. May and her cabinet are due next Tuesday to hold a discussion of senior ministers' competing views on Britain's future outside the EU - to remain close to the bloc or forge a new path.
She also faces a newly emboldened parliament after rebels in her own party joined forces with opposition lawmakers to demand that Parliament not the government gets the final say on the deal - a defeat they may try to repeat next week when May puts Britain's departure date into a bill to sever ties.
The EU is willing to start talks next month on a roughly two-year transition period to ease Britain out after March 2019 but wants more detail from London on what it wants before it will open trade negotiations from March.
Pro-Brexit lawmakers are concerned by a fall-back promise in the initial deal to have "full regulatory alignment" with the EU if there is no overall agreement on future ties, and fear that their desire for an independent Britain is being undermined.
The blow to May, already weakened after losing her Conservative Party's majority in an election in June, in parliament means that her government could now face a rush to pass the laws it needs to get ready for Brexit.
Up until the last minute of an often bitter debate, May's team tried to convince lawmakers in her party to block the measure to give Parliament a final vote, which the government fears will weaken its hand in Brexit negotiations. But enough conservatives rebelled to carry it narrowly by 309 votes to 305 in the 650-seat lower house.
"This defeat is a humiliating loss of authority for the government on the eve of the European Council meeting," opposition Labour leader Jeremy Corbyn said in a statement.
Divisions have split not only the governing Conservatives but Labour and the wider country -- which voted narrowly for Brexit 18 months ago.
Before dinner on Thursday, May and her EU peers will discuss the bloc's plan for closer defence cooperation with NATO Secretary-General Jens Stoltenberg. Long blocked by London, the plan now has backing from Britain, which as one of Europe's main military powers, wants to keep ties with the EU on defence.
Over dinner, leaders will discuss their response to the migration crisis from Africa and the Middle East, and lingering deep divisions over how to share the load.
They will confirm a rollover of sanctions on Russia over the Ukraine crisis and are likely to reaffirm their opposition to U.S. President Donald Trump's move to recognise Jerusalem as the capital of Israel.
(additional reporting by William James in London, Writing by Elizabeth Piper; Editing by Guy Faulconbridge.Jeremy Gaunt)