The Navy has found the former two-time commanding officer of the service’s Blue Angels demonstration team guilty of two counts under military law after allegations surfaced he created a command climate that allowed pornography to be placed in the cockpits of the team’s jets, allowed male genitalia to be painted on the roof of a training trailer and allowed hazing, the service announced on Tuesday.

Capt. Gregory McWherter — who led team during his second tour from May 2011 to November 2012 — was found guilty of “failure to obey an order or regulation” and “conduct unbecoming of an officer,” during an admiral’s mast hearing in Pearl Harbor, Hawaii on Monday.

An investigation — which began in late March following a complaint from a service member — found that McWherter, “allowed his officers and senior enlisted personnel to engage in inappropriate and sexually harassing behavior that significantly contributed to an unprofessional command climate during his second command tour,” according to a statement from the Navy.

The behavior led to a toxic and hostile command climate in the elite demonstration unit , according to the service.

“Examples include proliferation of explicit pornography and sexually suggestive images in the cockpits and in the… intra-squadron electronic communications tool, the painting of male genitalia on the roof of the center point trailer at the Blue Angels’ winter training facilities in El Centro, California,” according to a summary of investigation released by the Navy.

The investigation also found hazing was allowed of enlisted members of the team.

He received a punitive letter of reprimand by the panel, which will likely end his career in the Navy.

McWherter — who originally led the team from 2008 to 2010 — was brought back to command following the sudden 2011 resignation of Cmdr. David Koss, who left the team following a safety violation at an airshow in Lynchburg, Va.

In his second tour, “he subsequently became susceptible to hubris and arrogance, blinding him to the common sense judgments expected of all service members, but especially those entrusted with command,” read U.S. Pacific Fleet commander Adm. Harry Harris in his May 16 endorsement of the investigation.

Since he left the team, the Navy says command climate has improved.

“The inappropriate behaviors and criminal conduct documented in this report reflect poorly on the Navy in general and Naval Aviation in particular. This report is not an indictment of the current Blue Angels or of the Blue Angels as a whole,” Harris wrote.

“I am confident the Blue Angels have corrected their deficiencies and will serve our Nation in a manner consistent with the highest standards of the Naval service.”

McWherter was relieved of his duties as executive officer of Naval Base Coronado, Calif. on April 18, pending the results of the investigation.

He is a graduate of The Citadel and an experienced F/A-18 Hornet pilot. He led Strike Fighter Squadron 192 “World Famous Golden Dragons” (VFA-192) on three deployments on USS Kitty Hawk (CV-63), according to a report in the San Diego Union Tribune.

.