President Bidya Devi Bhandari administrated the oath of office to Oli at a ceremony organised at the presidential residence. Oli replaces the Nepali Congress' Sher Bahadur Deuba under whose leadership Nepal's Grand Old Party suffered an unprecedented defeat in the recent elections.
Bangladeshi Prime Minister Seikh Hasina, on behalf of the government and the people of Bangladesh, also extended congratulations to PM Oli on being appointed the prime minister of Nepal.
He will be the 41st Prime Minister of Nepal along with that he will also be the first Premier of Nepal after the promulgation of the new constitution in 2015.
KP Oli, as he is popularly known, succeeds the Nepali Congress Party's Sher Bahadur Deuba, who resigned almost two months after an alliance of communist parties swept the parliamentary and provincial elections.
Oli has formed a three-member Cabinet.
"There are a lot of differences and topics that tend to be discussed regarding the merger between the two parties, so the Maoist Centre meant to stay out of the government".
As the head of the largest party in the House of Representative, Mr. Oli is the natural claimant for the top post.
He joined the Communist Party of Nepal in February 1970 and got arrested for the first time in 1970. This will be his second stint as the Prime Minister.
Oli is one of the few political leaders of Nepal who spent several years in jail, He was imprisoned for 14 consecutive years from 1973 to 1987.
UML Standing Committee on Wednesday made a decision to name Oli as the party's prime ministerial candidate after Oli held one-on-one meeting with CPN-MC Chair Dahal in the morning, following which Oli and Dahal briefed their party colleagues about their discussion.