A Navy captain turned the Pacific into the world’s strangest drag strip — ordering two warships to stage a bizarre race that one sailor said nearly ended in tragedy, a high-ranking military official told The Post yesterday.

“Multiple witnesses interviewed by the [inspector general] and the commanding officers of both ships all stated that the ships were racing,” said Pacific Fleet spokesman Cmdr. Jeff Davis.

Capt. Holly Graf of the 10,000-ton guided missile cruiser Cowpens, the senior officer at the scene, was forced to walk the plank after her high-seas hot-rodding. She was relieved of command after the incident, one of the strangest in naval history.

One sailor who was aboard the Cowpens on Feb. 12, 2009, told the Web site militarycorruption.com, which first reported the incident, that both the cruiser and the 8,200-ton destroyer John McCain were plowing through the waves at “full throttle.”

The McCain is named for Sen. John McCain’s father and grandfather, both admirals.

“At one point we nearly hit the McCain’s fantail when the ships came within 300 feet,” the shaken sailor, whose name was withheld, told the Web site.

“I held my breath and prayed to God we wouldn’t collide because many sailors could have been killed and at least one Navy warship sunk at sea.”

The sailor said the Cowpens’ bridge crew was about to sound a collision alarm at one point, but Graf ordered them not to.

It was not clear how fast the ships had been going, but both have maximum speeds of more than 30 knots — about 35 mph.

The race was investigated late last year, along with allegations that Graf bullied her crew.

“What is unsubstantiated is the allegation that [the race] constituted . . . improperly hazarding a vessel,” Davis said.

But Graf, the first woman ever to command a guided-missile cruiser, was separately found guilty of “cruelty and maltreatment” of her crew and conduct unbecoming an officer.

She was issued a “punitive letter of reprimand” on Jan. 13 by Rear Adm. Kevin Donegan, commander of Carrier Strike Group Five.

Graf was due for a normal transfer within the month, but Donegan ordered her to be replaced immediately.

andy.soltis@nypost.com

