TIRANA (Reuters) - Opposition ministers joined Albania’s government on Monday to ensure public resources and the police will not be used to sway the June 25 general election, hopefully setting the scene for a trouble-free vote.

Albania's Prime Minister Edi Rama (L) listens to Ilir Meta, newly elected President of Albania holding speeach in the parliament in Tirana, Albania, April 28, 2017. REUTERS/Florion Goga

A compromise deal between the ruling Socialist Party and the opposition Democratic Party also set in motion a reform of the judiciary, a key condition of the European Union for accession talks with the Balkan country.

The Democrats returned to parliament after a three-month boycott to push for a technocrat government, delaying the judiciary reform and stepping up a war of words that worried the NATO member’s Western allies, whose pressure led to a deal.

“Our deal also entails that the loser will back the winner in our country’s bid to join the EU ... We might quarrel in our house, but we shall be together in asking Brussels to allow us into Europe,” Prime Minister Edi Rama told a crowd earlier.

If that outcome materializes, ex-communist Albania could have a smoother road ahead on its long trip to join the European Union, in less than a decade hopefully, since the political polarization that has hamstrung the accession process would be less of a problem.

“At the end of the year Albania shall get the green light to start accession negotiations with the EU,” Rama told parliament.

A new law would also jail anyone who sold or bought votes, supplied identity cards and any police officers influencing a vote’s outcome for up to seven years. Those abusing public funds would also be jailed.

“All these measures have been taken to guarantee the Albanian citizens freedom from pressure, prevent vote buying and allow a honest race for political parties in the campaign,” opposition Democratic Party Lulzim Basha told his lawmakers.

The opposition will now control the interior, justice, labor, finance, health and education ministries and have a deputy premier to ensure no undue influence is used. It will also chair the country’s electoral commission and office of the ombudsman.

Socialist and Democratic lawmakers backed the elements of the agreement with over 100 votes, more than the 93 votes required in parliament, which reconvened to pass the legislation.

Reports also noted that Rama’s deputy will be the former state lawyer whom he fired when taking office in 2013 while the interior minister will be a special forces colonel fired by the current defense minister for traveling without permission.