A Canadian military commander who served as a pilot for the Queen pleaded guilty today to the murders of two women and the sexual assaults of two others.

Colonel Russell Williams was the commander of Canada's largest air force base until being charged with the crimes in February.

He pleaded guilty to two first-degree murder charges, two sexual assaults and 82 breaking and entering charges in a court at Belleville, Ontario, and faces an automatic sentence of life in prison with no possibility of parole for at least 25 years.

The case prompted fears that Williams, who once flew Canada's prime ministers, could have been a serial killer.

Williams, who was born in England and raised in Canada, was pictured on the front page of the newspaper of Canadian forces base Trenton with the Queen and Prince Philip after serving as their pilot during a 2005 visit.

He had been considered a rising star in the military. In January he was photographed with the defence minister, Peter MacKay, during an inspection of a Canadian aircraft on its way to support relief efforts in Haiti.

Williams is alleged to have killed his second victim, 27-year-old Jessica Lloyd, just over a week after that. The first victim, Marie-France Comeau, a 38-year-old corporal under his command, was found dead in her home last November. Both women had been asphyxiated.

He was charged with forcible confinement, breaking and entering and sexual assault after two other women were attacked during separate break-ins in Tweed, central-eastern Ontario, last September.

A military veteran of 23 years, Williams never saw combat but was stationed across Canada and internationally.

In 2006, he was the commanding officer for Camp Mirage, the secretive Canadian forces base reported to be near Dubai. Investigators have looked at other areas to which he was posted.

• This article was amended on 19 October 2010. In the original, a subheading referred to Canada's presidents. This has been corrected.