RICHMOND, Va. (AP) – Lexington’s ban on the flying of the Confederate flag on city light poles does not violate a heritage group’s right of free speech, a federal appeals court said Friday. The three-judge panel of the 4th U.S. Circuit Court of Appeals in Richmond upheld a lower court ruling on the city’s 2011 ordinance limiting flags that may fly on the poles to those representing the city, the U.S. and the state of Virginia.

The Sons of Confederate Veterans had challenged the ordinance, saying it violated its constitutional rights and violated a 20-year-old court order when it enacted the ordinance in September 2011.

The group had appealed a decision last summer by a federal judge who concluded the ordinance did not violate a 1993 consent decree, which blocked the city’s attempt to ban the display of the Confederate flag during a parade honoring Thomas J. “Stonewall” Jackson, who is buried in Lexington along with Gen. Robert E. Lee.

The lower court said it the city’s 2011 ordinance was reasonable because it banned all non-government flag displays. And it does not restrict the flying of the flag elsewhere in the city.

In its opinion on Friday, the appeals court panel said although the First Amendment guarantees free speech in a public forum, it “does not guarantee access to property simply because it is owned or controlled by the government.”

Jeremy E. Carroll, an attorney representing the city, said he was pleased with the ruling, saying Lexington officials were confident it didn’t violate any constitutional rights.

Thomas E. Strelka, an attorney for the SCV, did not immediately return calls from The Associated Press seeking comment on the ruling or whether the group plans to appeal.

City officials adopted the ordinance after they received hundreds of complaints about Confederate flags planted in holders on light poles to mark Lee-Jackson Day, a state holiday in Virginia.

The flags were provided by SCV, and the city authorized them to be flown on the city poles. The SCV also paid for city workers to install the flags on approximately 40 poles.

The Confederate flag remains a lightning rod in the South, especially among black Southerners who consider it a symbol of slavery. The NAACP launched an economic boycott of South Carolina in 1999 over the Confederate flag that flew atop the Statehouse dome and in the chambers of the House and Senate. A compromise in 2000 moved the flag to a monument outside the Statehouse.

The heritage group has said Lexington’s light-pole restriction on the Confederate flag was a particular affront because of Lee’s and Jackson’s ties to the city of 7,000.

Jackson taught at the Virginia Military Institute before the Civil War.

He became widely known as “Stonewall” after the first Battle of Manassas. Lee, who led Confederate forces during the Civil War before surrendering at Appomattox in 1865, became president of what is now Washington & Lee University.