WASHINGTON (AP) — House Democrats averted a messy leadership struggle, clearing the way for Maryland Rep. Steny Hoyer to become second in command of their new minority without a challenge from South Carolina Rep. James Clyburn.

Under an arrangement worked out in private, officials said late Friday that Clyburn would instead receive a new position, title unknown and duties undescribed, explicitly labeled the third-ranking post in leadership.

The maneuvering was described by Democratic officials after Speaker Nancy Pelosi, D-Calif., issued a vaguely worded statement saying she intends to nominate Clyburn to a new No. 3 post. The statement made no mention of Hoyer, and officials who filled in the details did so on condition of anonymity, saying they were not permitted to speak publicly about the matter.

Pelosi is assured of remaining Democratic party leader when the new Congress convenes in January under a Republican majority. She has drawn no opposition for the post even though several members of the rank and file have said they would prefer she step aside after historic election losses. The GOP gained at least 60 seats in midterm elections, more than enough to return to power after a four-year absence.

A race between Hoyer, D-Md., and Clyburn, D-S.C., for the post of party whip took shape in the days following the election and quickly took on racial overtones. Clyburn is the most powerful African-American in Congress, and he drew a formal endorsement from the Congressional Black Caucus. But he failed to generate enough additional support to overcome Hoyer’s strength among liberals and conservatives alike, and it appeared his only options were to run against Hoyer and lose or else concede the obvious and step aside.

“Over the past four years, Congressman Clyburn’s effective leadership in the Whip’s Office was crucial to our passage of historic legislation on jobs, health care, veterans and Wall Street reform on behalf of the American people,” Pelosi said in her written statement.

Clyburn’s office declined to comment on the developments.

The leadership posts will be filled formally next week during a closed-door meeting of the Democratic rank and file.