image copyrightGetty Imagesimage captionLieutenant General Mike Rouleau (far left) said the golf game had eroded trust in the military
The Canadian military's second-in-command has resigned after playing golf with the country's former defence chief, who is under investigation for sexual misconduct.
Lieutenant General Mike Rouleau said he invited General Jonathan Vance to play golf "to ensure his wellness".
In his former role, Lt Gen Rouleau had authority over military investigators looking at the case against Gen Vance.
Lt Gen Rouleau said the pair did not discuss details of the investigation.
But he admitted that his decision had "intensified recent events and contributed to further erosion of trust" in the military.
Gen Vance, who retired in January, has denied the sexual misconduct claims made against him.
News about the golf game broke last weekend in local news outlets The Globe and Mail and Global News.
In a letter, Lt Gen Rouleau acknowledged that, on 2 June, he played golf in Ottawa with Gen Vance and the commander of the Canadian navy, Vice Admiral Craig Baines.
image copyrightGetty Imagesimage captionGeneral Jonathan Vance has denied allegations of sexual misconduct made against him
But general said only he should be held accountable, because Vice Adm Baines' attendance was "surely predicated" on his attendance.
Vice Adm Baines, in a separate statement on Sunday, has issued an apology for taking part in the game.
Lt Gen Rouleau's resignation comes soon after Prime Minister Justin Trudeau weighed in on the matter on Sunday, saying that he and Vice Adm Baines had to "answer for themselves".
Gen Vance is facing allegations of misconduct against army Major Kellie Brennan and another unidentified woman. Military police are looking at whether his relationship with Maj Brennan, one of his former subordinates, broke military regulations.
Earlier this year Maj Brennan delivered a bombshell testimony to a parliamentary committee. She alleged that the general considered himself "untouchable", and that he fathered two of her children but did not support them.
In a separate case, Gen Vance is also being investigated for allegedly sending a sexually suggestive email to a female subordinate.
During recent years, Canada's military has been swept up by controversy over sexual assault allegations. A number of military leaders are under investigation for claims of inappropriate behaviour to colleagues.
Back in 2016, while he was head of the military, Gen Vance said he was "extremely disappointed" after a national survey revealed nearly 1,000 soldiers had complained of sexual harassment during the previous year.