He defeated Ralph Regenvanu in a ballot in parliament on Monday by 31 votes to 21, Radio New Zealand International reported.
Loughman, a member of the Vanua'aku Pati, has been the MP for Tanna since 2004.
He was nominated as a candidate by Ishmael Kalsakau, who has led the opposition bloc for the past four years.
In a twist, the previous prime minister, Charlot Salwai, put forward the Port Vila MP Ralph Regenvanu to challenge him.
Regenvanu leads the Graon mo Jastis Pati, which won the most seats in last month's election.
Loughman has a daunting task ahead: swathes of the country lie in ruins after Cyclone Harold, while he also has to keep out a pandemic that has already shattered the fragile economy, RNZI reported.