What do Labour and Plaid Cymru agree and disagree on?
After two days of talks, Labour and Plaid Cymru have got a deal.
As a result, Carwyn Jones was reinstated as first minister on Wednesday after Plaid withdrew Leanne Wood as a candidate.
But details of the deal showed the agreement picks up on several areas where the two groups coalesce.
And it makes omissions in places the parties have disagreements - potential fuel for future arguments.
What is the deal?
Labour and Plaid have committed to prioritise work on areas "that enjoy support from across much of the assembly".
- The delivery of new all-age apprenticeships - Plaid has committed to more posts
- Work on a new treatment fund for the NHS
- A plan to increase the numbers of GPs and primary healthcare workers in Wales
All of those areas had some level of consensus in their respective manifestos.
The parties have said they would establish a new National Infrastructure Commission and a Welsh development bank.
Three committees will also be created for joint working on financial, legislative and constitutional matters.
Where do the parties meet?
There was a great deal of consensus between a number of parties on different issues at the election.
Plaid and Labour in particular have similar policies in both their manifestos, including areas which have been included in the deal.
The deal has committed the Welsh Government to prioritise work on apprenticeships, and both parties said they would create more of the posts.
Plaid said it would have created 50,000 extra apprenticeships. Labour, on the other hand, said it would create 100,000 all-age apprenticeships.
Both parties have policies to boost numbers of health care workers in Wales. A signature Plaid policy has been that it will create 1,000 extra doctors and 5,000 more nurses, while Labour has promised action to attract more GPs to Wales.
A new treatment fund was also on the cards from both parties. Plaid said it would establish a £50m New Medicines and Treatments Fund for Wales, while Labour said it would set up an £80m fund.
Most parties have promised something on childcare.
Labour said it would provide 30 hours free childcare a week for working parents of three and four year olds. Plaid said it would provide full-time early education of 30 hours a week by 2021.
On the economy, both parties promised a new bankto provide finance to Welsh firms. Plaid favours a national bank of Wales. The Labour option is a Welsh development bank.
They have also also pledged action on business rates. Labour has promised a cut for all small firms while Plaid also planned to boost small firms by cutting business rates.
The two parties have also made commitments over a possible smacking ban, although Labour has placed an important proviso on what many would say would amount to a smacking ban.
Plaid said it would introduce legislation to remove the defence of reasonable chastisement.
Labour said it would "seek cross party support" to do the same.
If their policies are similar anyway, what does Plaid get out of it?
The party has said it has achieved agreement on five policies from its nine main manifesto pledges.
Party figures point to the National Infrastructure Commission - an arms-length body which would take a "strategic" approach to Wales' infrastructure and have access to new financial resources - as a significant achievement and something that was not in Labour's manifesto.
But on items like apprenticeships and childcare, where there is significant overlap between the parties, Plaid said it is ensuring Labour consider the issues a priority.
Labour, for its part, got to re-elect a first minister without, it claimed, giving up any of its commitments for government.
Where could there be flashpoints?
The deal does not touch two important for the last Welsh Government, but where consensus proved elusive.
One of those is the M4 Relief Road. Labour's preferred option is to build a black route six lane motorway south of Newport. Plaid wants to instead upgrade existing roads along the lines of Professor Stuart Cole's proposed blue route.
Both parties have had different approaches to the issue of local government reform.Labour has proposed merging Wales' 22 councils to as few eight or nine.
Plaid has suggested keeping the existing council structure and adding regional co-ordinating authorities.
In its 2016 manifesto, Labour did not specify details of which M4 route it would build, or how many councils there would be left, despite its previous commitments on both.
Elsewhere, demands for the single transferable vote at elections have also long been on Plaid's to-do list, but saw no light of day in the deal.
Ms Wood told the chamber on Wednesday there was not time "to consider and negotiate on the most difficult issues" including the M4, detailed measures to save the steel industry, fair voting or student finance.
She said Plaid would return to these and other matters "through the budget and the other vehicles that are available to us".