An adorable pygmy goat may have created a mess for a top Navy officer. 

Capt. John Banigan, the commanding officer of the cruiser USS Lake Erie, has been removed amid an investigation into, among other things, Banigan's transport of a pygmy goat named "Master Chief Charlie" to California. 

The goat -- a photogenic, well-groomed, brown-and-white sidekick -- apparently has been serving as the unofficial mascot of the USS Lake Erie for a few years. The Navy Times, which uncovered the goat controversy, reported that the USS Lake Erie crew originally got the goat as a joke -- "goat locker" is slang for the chief's mess. He's since become part of the team, and reportedly is a hit at command picnics and other events. 

But here's where the ship command may have run into trouble: When Master Chief Charlie was brought along for the ride from Hawaii to San Diego, Banigan may have violated California regulations on transporting livestock, the Navy Times reports. 

Navy spokesman Lt. Rick Chernitzer told FoxNews.com the investigation also involves looking at Navy regulations that govern how to transport livestock, though he could not get into specifics. 

Chernitzer confirmed to FoxNews.com that Banigan was relieved of command on April 27, "due to loss of confidence in his ability to command." 

The probe of the ship's leadership initially started as an investigation into the "command climate" but "the goat came out" in the course of that probe and is now part of it, Chernitzer said. 

As for the current whereabouts of Master Chief Charlie, the Navy spokesman said the Lake Erie mascot has been taken off the ship and is located "somewhere" in San Diego. 

"I know it's safe," he said. 

For now, Banigan has been assigned to a Navy staff job in San Diego. 

Meanwhile, the goat continues to garner a following -- on Twitter. 

Shortly after Banigan was removed, one "Master Chief Charlie" started a Twitter account, which already had 120 followers as of early Monday afternoon. 

The account also includes such reflections as, "This little goat misses its boat" and, "it was the adventure of a lifetime. #NoRegrets." 

FoxNews.com's Judson Berger contributed to this report.