The Navy has fired a dozen commanding officers this year, a near-record rate, with the bulk getting the ax for offenses related to sex, alcohol or other forms of personal misconduct.

The terminations, which follow a similar spike in firings last year, have shaken the upper ranks of the Navy, which has long invested enormous responsibility in its commanding officers and prides itself on a tradition of carefully cultivating captains and admirals.

Over the past 18 months, the Navy has sacked nine commanding officers for sexual harassment or inappropriate personal relationships. Three others were fired for alcohol-related offenses, and two on unspecified charges of personal misconduct. Combined, they account for roughly half of the 29 commanding officers relieved during that period.

Adm. Gary Roughead, the chief of naval operations, called the increase in firings “bothersome” but said the Navy was duty-bound to uphold strict behavioral standards, even when commanders are off-duty. He attributed the rise in part to the revolution in communications and technology, which has made it easier for sailors and their families to snoop on one another and then instantly spread the word — even from once-isolated ships at sea.

“The divide between our private and professional lives is essentially gone,” Roughead said in an interview. “People can engage in the debate — does it really matter what a commanding officer does in their personal life? We believe it does, because it gets right to the issue of integrity and personal conduct and trust and the ability to enforce standards.”

Capt. Donald Hornbeck, commander of a destroyer squadron attached to the aircraft carrier USS Carl Vinson, was fired April 23 while deployed in the Arabian Sea after Navy officials said they found evidence of an “inappropriate personal relationship.” Four days later, the Navy dismissed Cmdr. Jay Wiley, the commanding officer of the USS Momsen, a destroyer, citing “misconduct,” according to a Navy statement. As a general rule, being fired as a naval commanding officer is a career-ending move that leads to retirement.

Military officials did not elaborate on the alleged transgressions. The Navy Times newspaper, citing an anonymous naval source, reported that Hornbeck was found to havehad a relationship with another officer’s wife and that Wiley’s problems involved alcohol and inappropriate behavior with a sailor under his command. Neither Hornbeck nor Wiley responded to requests for comment.

April was a particularly tough month for Navy commanders. On April 11, Cmdr. Timothy Murphy, a squadron commander at Whidbey Island Naval Air Station in Washington state, was fired after he was cited by police for driving under the influence, according to a Navy statement. Two other commanders were sacked the same month for on-the-job performance woes.

None of the fired Navy commanders named in this article responded to requests for comment submitted through Navy public affairs officials.

The Navy is not the only military service dogged by poor performance in its upper ranks. The Army has relieved or disciplined three brigade commanders this year who were en route to — or returning from — war zones in Iraq and Afghanistan.

One case involved Col. James H. Johnson III, commander of the 173rd Airborne Brigade, whom the Army fired in March for “inappropriate conduct” after his wife accused him of carrying on a long-term affair with an Iraqi mistress and repeatedly visiting her in Europe, according to an Army statement and divorce papers. Johnson declined to comment through an Army spokesman.

“It would be silly to say I wasn’t concerned,” Gen. Martin E. Dempsey, the Army chief of staff, told reporters recently. He said the Army was considering amending its command selection process to rate officers based on feedback from subordinates and peers, instead of just superiors.

The Navy’s rash of firings has stirred special anxiety, however, with some officials and analysts characterizing the problem as a leadership crisis.

Since January, the Navy has booted a dozen commanding officers and temporarily removed a 13th, pending an investigation. At that pace, the Navy will match the record total of 26 commanders it fired in 2003.

“It’s a phenomenally high number,” said Norman Polmar, an Alexandria-based naval historian who has been an adviser to several top Navy officials. “There is something seriously wrong.”

He said the trend is a clear sign that the Navy’s screening process for promotion is flawed. “Perhaps we don’t have the best and brightest,” he said. “It’s also the naval leadership’s responsibility,” he said, to ensure that commanders are qualified and to articulate appropriate standards for officers.

Navy officials said they have been consistent and rigorous in holding their commanders responsible.

In a telephone interview, Navy Secretary Ray Mabus said he didn’t think the firings illustrated a broader problem, noting that only a tiny percentage of the roughly 1,500 commanding officers in the service have been affected. About 285 of those commanders are in charge of ships and submarines; the remainder oversee various agencies in the Navy.

“We hold absolute standards of conduct, and if you breach those, you’re going to be relieved,” he said. “But I don’t see a pattern, and I don’t think it’s an epidemic in that sense.”

After the record number of sackings in 2003, the Naval Inspector General conducted a review of terminations over the previous five years. Although the review found that personal misbehavior was the largest single cause, it found “no systemic factors relating to the increase,” such as shortcomings in the Navy’s promotion system.

Some officers and analysts suggested that the rash of inappropriate relationships stemmed from the Navy’s continuing adjustment to the presence of women on ships. “Many commanding officers didn’t deal with women when they were junior officers, and now they have to,” Polmar said.

The Navy opened its entire surface combat fleet to women in 1994 and began training female officers to serve on submarines last year. Overall, women make up about 15 percent of the active-duty Navy.

But Roughead, the chief of naval operations, scoffed at the idea that gender integration was to blame. “I’ve never heard anybody say, ‘I wouldn’t have strayed if there were no women on this ship,’ ” he said.

Of the 29 commanding officers fired since last year, three have been women.

Cmdr. Mary Ann Giese, the commanding officer of the Naval Computer and Telecommunications Station in Bahrain, was relieved of command Aug. 21 after a Navy investigation found that she had engaged in “inappropriate relationships” with sailors.

The two other female commanders were terminated for excessively harsh leadership styles.

Capt. Etta Jones, commander of the USS Ponce, was fired April 23 after a sailor called an anonymous Navy hotline to report a “hostile command climate” while the warship was in the Mediterranean Sea to support the war in Libya. Navy investigators found that Jones endangered two sailors with a loaded weapon, failed to prevent hazing and cultivated “a hostile work environment permeated by verbal abuse, fear and intimidation.”

The Navy also had to intervene on the USS Cowpens, a warship operating in the Pacific, after sailors complained that their commander, Capt. Holly Graf, was verbally abusive, forced them to take timeouts like toddlers and created an “environment of fear and hostility,” according to a Naval Inspector General report. When the Navy dismissed her in January 2010, officials concluded she had subjected the crew to “cruelty and maltreatment.”

Staff writer Greg Jaffe contributed to this report.