James P. Hoffa, the Teamsters president, has suffered two recent, little-noticed setbacks that are likely to make it harder to achieve his goal of ending federal supervision of the union.

In the first, a federal judge, using extraordinarily harsh language, rejected the rules that the union and the Justice Department had developed to run next year's Teamsters election.

In the other setback, a federal oversight board filed charges this month that could lead to the expulsion of the head of the Teamsters in Michigan, Lawrence Brennan, a mentor to Mr. Hoffa who played a major role in his ascent to the union's presidency.

The two developments come at a time when Mr. Hoffa has vowed to improve the image of a union that was long known for corruption. And they come as Mr. Hoffa, who took the union's helm 16 months ago, has made a concerted effort to persuade the Justice Department to end its intensive and invasive decade-long supervision of the International Brotherhood of Teamsters.

"It's been a bit of a pipe dream that federal supervision will end any time soon, but these developments will certainly make it harder," said Michael Belzer, a trucking industry expert at the University of Michigan.

Last Friday, Judge David N. Edelstein of Federal District Court in Manhattan issued a decision denouncing the rules that the union and government had proposed for next year's Teamsters' election.

"The submissions are a farrago of ill advice and misguided, inept, controversial and confused argots," he wrote. "Their program has the potential of bringing grief, strife, controversy and corruption."

But union and government officials professed some bewilderment at the decision of Judge Edelstein, who oversees the federal supervision of the union, because he never spelled out what specifically he objected to.

Potentially more damaging to Mr. Hoffa were charges that the oversight board, the Independent Review Board, brought against Mr. Brennan. The board charged him with masterminding a scheme in which the executive board of a Teamsters' local in Detroit doubled the board members' traditional Christmas bonus. Then the board members contributed the additional bonus to Mr. Brennan's campaign.

The oversight board maintained that the doubled bonus was a pretext to siphon about $30,000 in members' dues money to finance Mr. Brennan's re-election. The board charged Mr. Brennan with embezzlement and violation of his fiduciary duties.

Before Mr. Hoffa was elected Teamsters president in December 1998, he was Mr. Brennan's administrative assistant. Mr. Brennan is president of Teamsters Local 337 in Detroit and of Teamsters Joint Council 43, which oversees all of Michigan's locals.

When federal officials ruled a decade ago that Mr. Hoffa could not run for the union's presidency in 1991 because he had not worked as a Teamster, Mr. Brennan helped Mr. Hoffa meet that qualification by hiring him as an assistant.

The oversight board has forwarded its charges to the Teamsters executive board to investigate. Union officials said Mr. Hoffa has recused himself because he knows Mr. Brennan and the five other Michigan Teamster officials charged. They can face fines, suspension or even expulsion.

In a statement, Mr. Brennan said that he was innocent. His defenders say the charges were based on the testimony of just one official, while several other Teamster officials have testified to the contrary.

"This is going to be a test for Hoffa," said Ken Paff, national coordinator of Teamsters for a Democratic Union, a faction that has repeatedly clashed with Mr. Hoffa. "His mentor, his benefactor, the man who created a position for him to become eligible for president, has been charged with embezzling a lot of money. Hoffa says he's going to establish ethics in the Teamsters. We're going to see if he has the will to follow through here."

The oversight board did not bring charges against Carlow Scalf, a former Brennan assistant who is now one of Mr. Hoffa's top aides. In its written charges, the oversight board assailed Mr. Scalf's testimony as misleading and faulted his role in moving all the Christmas bonus money to Mr. Brennan's campaign.

"The fact is Carlow participated fully in the investigation and was not named as a defendant," said Bret Caldwell, a Teamsters spokesman.

Regarding the election rules, Judge Edelstein said the union should institute and rely on rules similar to those used in the 1991, 1996 and 1998 elections. Federal monitors ordered a rerun election in 1998 after finding that aides to Ron Carey, who narrowly beat Mr. Hoffa in 1996, had siphoned union money into the Carey campaign.

But Teamster officials said they had based their proposed election rules largely on those of past years.

Herb Haddad, a spokesman for the United States Attorney's office in New York, said, "The government and the Teamsters are working together to attempt to meet the court's concerns."

Patrick J. Szymanski, the Teamsters' general counsel, wrote to the Justice Department yesterday, saying that the union was moving ahead with its plans to conduct the election and hoped the ruling would not delay the election. He said the union would consult with the department about what steps were appropriate in light of Judge Edelstein's ruling.

Tom Leedham, an Oregon Teamster leader who plans to run against Mr. Hoffa next year, said the judge must have found the proposed rules objectionable because they allow for little input in shaping the rules from forces other than Mr. Hoffa's.