"I'm guilty," Rear Adm. Rick Williams told investigators as soon as he was confronted in January about spending hours looking at pornography on a Defense Department computer.

Relieved on Jan. 9, 2016 as commander of Carrier Strike Group 15, Williams admitted to viewing explicit photos and videos multiple times for as long as nine hours while underway on the amphibious assault ship Boxer in 2015, according to a command investigation released Tuesday.

He went to admiral's mast on Jan. 27, 2016, where 3rd Fleet commander Vice Adm. Nora Tyson found him guilty of violating a lawful order and conduct unbecoming an officer and a gentleman.

All sailors go through regular computer training, particularly before getting underway, and Williams' story shocked many who thought he should have known better.

"Senior naval officers, especially those in command, are expected to uphold unimpeachable personal, moral and ethical standards," Rear Adm. Russell Allen, deputy 3rd Fleet commander, wrote in his findings of fact. "Rear Adm. Williams' personal violation of those standards, as detailed in this investigation, suggests he may have difficulty upholding those standards in the personnel he leads."

His former command is responsible for certifying carrier strike groups, amphibious ready groups and independently deploying surface ships before they head out, so Williams spent a good chunk of time on the amphibious assault ship Boxer as it prepared for deployment last year.

He was on board for 18 days over four underway periods, according to the report, for Boxer's participation in exercise Dawn Blitz 2015 and its pre-deployment work-ups. .

× Fear of missing out? Sign up for the Navy Times Daily News Roundup to receive the top Navy stories every afternoon. Thanks for signing up. By giving us your email, you are opting in to the Navy Times Daily News Roundup.

On Dec. 18, 2015, a week after his last on-board stint ended, Boxer began a cybersecurity sweep , including a keyword search of the Web logs to see if anyone had accessed inappropriate websites. The word "cuck" turned up a few hits, an apparent reference to cheating on a spouse.

The information systems technician 2nd class who discovered the sites checked them on his cellphone to see if he was right — he was. They contained "X-rated pictures and short sexual videos," the investigator wrote.

The IT2 worked backward to see who had looked at them, and Williams' username came up.

According to the report, Williams looked at photos ranging from partially nude women to "sites that contained images and video of female breasts and female and male genitalia, including images and video of persons in oral sex and sexual intercourse."

The IT2 put together an Excel spreadsheet of every URL that Williams visited, and it was included in the investigation, but the Navy did not release the enclosures that contain it.

"It is estimated that Rear Adm. Williams spent approximately four hours during DAWNBLITZ15 and five hours during BOXARG CERTEX viewing pornographic or sexually explicit websites on-board Boxer," Allen wrote.

Investigators also searched Williams' office computer at CSG 15, finding that he used it to browse bikini photos at least once.

"I didn't know it was this much," he told investigators, adding that he accessed the pornography because "it was available."

Williams claimed that he didn't know how he found links to the sites but that it started with pop-ups and he continued from there.

Following his nonjudicial punishment, Williams was issued a letter of reprimand and assigned to 3rd Fleet's staff, "pending the conclusion of all matters relating to this investigation," Tyson wrote in her endorsement of the report.

"Rear Adm. Williams committed a non-recoverable breach of trust and confidence placed in him as a Flag officer in command and based on such activity, has compromised his ability to serve as a Flag officer," she added.

Williams, a career surface warfare officer, had headed of Carrier Strike Group 15 since June. He could not be reached after the report was released.

He earned his commission in 1984 after graduating from the Rochester Institute of Technology and served aboard two frigates and a hydrofoil as a junior officer before becoming executive officer of the destroyer O'Bannon, according to his official biography.

He took command in 2002 of the frigate McInerney, before going on to lead Destroyer Squadron 26 and then a position as deputy 5th Fleet commander, directing maritime operations in support of operations Iraqi Freedom and Enduring Freedom.

Prior to his job at CSG 15, he was the commander of Navy Region Hawaii and Naval Surface Group Middle Pacific.

Williams is the first one-star fired since 2013, when Stennis strike group commander Rear Adm. Chuck Gaouette was ousted on deployment for misconduct including foul language, flipping off lieutenants, speculation that black admirals were chosen because of their race and sending fellow officers a racially-charged email about a black sailor.