Libya’s interim leadership chose a new prime minister on Monday, The Associated Press reported.

Abdel-Rahim al-Keeb, an electronics engineer, was chosen by 51 members of the National Transitional Council (NTC) and will appoint a new Cabinet in coming days, the report said.

The new government will run Libya in the next few months and to pave the way for general elections.

NTC spokesman Jalal el-Gallal told AP al-Keeb had received 26 votes. He added that the NTC wanted to form a new interim government after the fall of Muammar Qaddafi because its initial members started out as an impromptu group.

Meanwhile, the seven-month NATO mission in Libya officially ended on Monday, AP reported. The mission was a key factor in ousting longtime dictator Qaddafi.

NATO Secretary-General Anders Fogh Rasmussen, who was making his first visit to Tripoli since the end of the civil war that ripped through Libya, said the end of the mission was the close of a “successful chapter in NATO’s history.”

Fogh Rasmussen also congratulated the Libyan rebels on their victory, saying they “helped change the region.”

“You acted to change your history and your destiny, we acted to protect you,” AP quoted Fogh Rasmussen as having said at a news conference with Libya’s interim leader, Mustafa Abdul-Jalil. “Together we succeeded: Libya is finally free.”

“At midnight tonight, a successful chapter in NATO’s history is coming to an end, but you have already started writing a new chapter in the history of Libya, a new Libya based on freedom, democracy, human rights and the rule of law,” Fogh Rasmussen added. “We know it’s not easy. We know the challenges, and if you ask us for help in areas where we can help, we will.”