CINCINNATI  Ohio must include the Libertarian Party’s nominees on its ballot in November, a court has ruled, complicating Senator John McCain’s effort to win conservative votes in a hotly contested state rich in electoral votes.

The Libertarian candidate, Bob Barr, formerly a Republican congressman from Georgia, will lead his party’s ticket, which includes the vice-presidential candidate, Wayne Allyn Root, and candidates for governor and several Congressional seats.

“Ballot restrictions are all designed to prevent competition for the Democrats and Republicans,” said Russell Verney, Mr. Barr’s campaign manager, who said inclusion on the ballot with a party banner should help attract more votes than if Mr. Barr were on the ballot as an independent candidate.

The court order, issued Thursday, directs the Ohio secretary of state, Jennifer L. Brunner, to disregard her office’s current guidelines for ballot inclusion, which require eligible parties to gather valid signatures equal to one-half of 1 percent of the total vote in 2006 or to have garnered at least 5 percent of the last election’s votes. The Libertarians submitted 6,545 signatures in March, far below the approximately 20,000 needed. Ms. Brunner’s office has not decided whether to appeal the ruling.