The Left Alliance of the CPN-UML, led by Prime Minister K P Sharma Oli and CPN-Maoist Centre, led by former premier Prachanda, had in December secured 174 seats in the 275-member Parliament in the provincial and parliamentary polls.
Top leaders of the two communist allies, in a meeting last night in Baluwatar, officially approved the "left unity" deal, agreeing in principle on party leadership, organisation and ideology.
The deal, brokered through a series of negotiations since the two sides reached an understanding on merger in October last year, has confirmed the biggest political union in Nepal's history.
It will convert the first and the third largest parties into a single political entity.
The two parties had secured a comfortable majority in six of the seven provinces. In 2015, Nepal adopted a new Constitution that split the country into seven provinces.
In a seven-point pact signed by Mr Oli and Prachanda, the two sides have agreed to form Communist Party of Nepal (CPN), a leftist party with Marxist-Leninist ideology as its guiding principle.
The UML has won 121 seats while the Maoist Centre secured 53 seats in Parliament. The unified party will have 174 seats, 10 short of two-thirds majority.
Sources close to the Maoists said that the agreement was signed after interlocutors from the two sides hammered out a sketch deal on leadership, organisation and ideology which would be given the actual shape through a joint general convention in one-and-a-half year.
However, the agreement on leadership and organisation has not been mentioned in the written agreement.
Mr Oli and Prachanda will jointly run the party, besides rotating the premiership, according to the understanding reached between the two chairmen.
In power-sharing on governance, the CPN-UML and Maoist Center will retain President and Speaker of the federal Parliament. Similarly, Maoist Center has retained the post of vice president, while deputy speaker will be from the UML.
The merger, given the size of the two parties, is the biggest political experiment of its kind in Nepal's history which will have a long-term impact on Nepal's political, economic and social spheres.
The pact would ensure a leftist government at the Center and in six provinces for a full five-year term.
A five-year government is expected to bring the much-needed stability in Nepal's political sphere and usher the country into an era of peace and economic growth.
The Maoist party will join the UML-led government within a couple of days, said Sunil Manandhar, central secretariat member of the Maoist Centre.
The two parties' unification will be officially announced by mid-March, he added.
In October last year, the two parties, in a surprise move, had announced a pre-poll alliance and said that they would be merged following the federal and provincial polls.
The Nepali Congress (NC), led by former prime minister Sher Bahadur Deuba, faced a humiliating defeat in the historic parliamentary and provincial assembly polls, winning just 23 seats out of a total 165 seats.
The successful completion of polls, according to experts, would be a step forward in cementing democracy and providing political stability to Nepal, which has seen 10 prime ministers in as many years.
Get Breaking news, live coverage, and Latest News from India and around the world on NDTV.com. Catch all the Live TV action on NDTV 24x7 and NDTV India. Like us on Facebook or follow us on Twitter and Instagram for latest news and live news updates.