The Move Forward Party (MFP) will step aside and let Pheu Thai Party take the lead in forming the new government if its leader Pita Limjaroenrat fails to get enough support from senators in a prime ministerial vote, according to Pheu Thai sources.
In return, Pheu Thai will back down and let the MFP take the House speakership as the House of Representatives will convene to select the new speaker and two deputies on Tuesday, the sources said.
The agreement was reached between key figures of the two parties on Thursday evening at Pheu Thai's headquarters.
They included Pheu Thai's prime ministerial candidates Paetongtarn Shinawatra and Srettha Thavisin, and the MFP's deputy leader Sirikanya Tansakun.
Under the agreement, Pheu Thai would not compete with the MFP for the House speakership and instead would take the positions of the two deputy House speakers, the sources told the Bangkok Post.
Pheu Thai would support Mr Pita's bid for prime minister, but if Mr Pita fails to get sufficient support from the senators, he must step aside and allow Pheu Thai to have its turn at forming a coalition government.
The two parties would remain united, however, and the MFP must not pull out of the coalition and become the opposition, the sources said.
Without the MFP, which has 151 MPs, Pheu Thai would have to forge an alliance with the outgoing coalition parties, which would likely spark demonstrations led by the MFP's supporters and make life difficult for the new government, the sources said.
"The two parties have never made it clear whether the runner-up party [Pheu Thai] should be allowed to take the lead in forming the government if the first-placed party [MFP] fails in its bid until they reached an agreement [on Thursday].
"Previously, many Pheu Thai MPs had opposed the MFP taking both the House speakership and the prime minister's position," the sources said.
"We had to admit we were concerned that if Mr Pita failed to get enough support from the senators, his supporters would take to the streets in protest," the sources said.
This was the first time the two parties have managed to clear the air after more than a month of being deadlocked, the sources added.
MFP secretary-general Chaithawat Tulathon said on Friday both parties would hold a formal discussion on Sunday to thrash out any remaining differences before attending a meeting of the eight prospective coalition parties on the same day.
He said that so far, both parties have not yet formally discussed issues related to the House speakership.
"We don't know where the report [regarding the latest agreement between the two parties] came from. We insist that we must wait for the outcome of formal talks between both parties. We hope things will turn out fine," he said.
Mr Chaithawat said he expected the 250 senators to vote for a prime ministerial candidate nominated by a party that can gather enough support from coalition parties to form a government.
He also confirmed that after the two parties thrash out their differences over the House speakership, the next move is to discuss the post of prime minister.
Mr Pita said on Friday that talks with Pheu Thai were making progress.
"I don't believe Pheu Thai will lay down such conditions. There is only one scenario, as suggested by Mr Srettha and Pheu Thai leader Dr Cholnan [Srikaew], that is, we will move on together, and I will become the next prime minister," Mr Pita said.
Mr Srettha reaffirmed his support for Mr Pita's bid for the premiership following reports of the pact.
"We adhere to the principle that the 'democracy' side will stick together and work together."
Asked to comment on the report that Pheu Thai would take the premiership if the MFP lacks enough votes from the senators, Mr Srettha said such matters should be addressed by Pheu Thai leader Dr Cholnan and secretary-general Prasert Chantararuangthong.
On Thursday, the Secretariat of the House of Representatives asked all MPs to attend the first House session on July 4, when the selection of the House speaker will take place.