A federal appeals court ruled Wednesday that Maryland Gov. Robert Ehrlich acted within the law when he barred state employees from speaking to two writers from the state's biggest newspaper.

The Baltimore Sun had argued that the governor violated the writers' First Amendment rights by denying them information available to others and retaliated against them for reporting that was unfavorable to Ehrlich's administration.

But a three-judge panel of the U.S. Court of Appeals, based in Richmond, Va., ruled that the governor's order had a minimal effect on the reporters' abilities to do their jobs, and that it did not have a chilling effect on the Sun's exercise of its First Amendment rights.

The court said that the governor and other state officials are free to choose the reporters to whom they disclose information, and that political reporter David Nitkin and former columnist Michael Olesker were able to continue reporting on state government despite the governor's ban.

"While Nitkin and Olesker might now be disfavored, they are no more disfavored than the many reporters without access to the governor," the judges wrote.

The Sun will not appeal the decision, editor Tim Franklin said in a statement.

"We do not want this case to be an ongoing issue during an election year," Franklin said.

Ehrlich said in a statement that he respected the ruling. "These decisions confirm important Constitutional principles that are recognized and respected by this Administration," he said.