A coalition government has been agreed in Italy, ending months of uncertainty in the EU's fourth-biggest economy.

Prime Minister-designate Giuseppe Conte presented his list of ministers to President Sergio Mattarella for the second time in a week and the new government will be sworn in on Friday.

Ministers are drawn from both the anti-establishment Five Star (M5S) and the right-wing League.

Attempts to form a technocratic government had failed.

Mr Mattarella rejected Mr Conte's original choice for economy minister but a different candidate was agreed on Thursday.

What deal was reached?
After meeting President Mattarella, Mr Conte confirmed reports that the new candidate for the key economy minister post would be economics professor Giovanni Tria.

M5S leader Luigi Di Maio and Mr Salvini said in a brief joint statement: "All the conditions have been met for a M5S-League government."

Other notable appointments to the new cabinet include:

Interior and Deputy Prime Minister: Matteo Salvini (League)

Industry and Deputy Prime Minister: Luigi Di Maio (M5S)

Foreign: Enzo Moavero Milanesi (independent, ex-European Affairs minister)

Defence: Elisabetta Trenta (M5S)

European affairs: Paolo Savona (independent), the controversial original choice for finance

"We will work intensely to realise our political objectives which we have already put together in our government contract," Mr Conte was quoted as saying by the Reuters news agency.

The new government is expected to be sworn in later on Friday.

After the ceremony, it will face confidence votes in both chambers of parliament, where the M5S and the League have a majority.

Italy is no stranger to political turmoil - it has had 64 governments since World War Two.

Mr Conte is taking over from Paolo Gentiloni, who led a coalition cabinet for two years.

How did we get here?
4 March: 5-Star wins 32% of the vote in the general election, with the League taking 18%.

The two populist parties eventually attempt to form a coalition, putting forward Mr Conte, a political novice, as prime minister.

28 May: Mr Conte presents his cabinet list to President Mattarella who vetoes the choice of Mr Savona as finance minister on the grounds that he is a eurosceptic. Mr Conte bows out. Both parties are furious and Mr Di Maio calls on parliament to impeach Mr Mattarella. The president asks ex-IMF economist Carlo Cottarelli to form a technocratic government until fresh elections can be held.

30 May: Mr Cottarelli appears to suspend his own efforts to form an interim administration as Five Star and the League engage in new talks.

31 May: Mr Conte returns to the president with a new cabinet list, which is accepted.