By Harriet McLeod

CHARLESTON S.C. (Reuters) - A Confederate flag displayed at the Citadel military college in Charleston, South Carolina, can keep flying despite objections that it is offensive, the state attorney general's office said on Tuesday.

A Charleston official had objected to the presence of the flag in the college's Summerall Chapel, where it has flown since 1939, and called for cutting almost $1 million in public funding from the school.

In an opinion on Tuesday, Solicitor General Robert D. Cook said South Carolina's 2000 "Heritage Act" protects "monuments and memorials honoring the gallantry and sacrifice in this state's various wars."

The law was a legislative compromise reached after years of controversy that swirled around the flying of a Confederate flag over the State House in Columbia. The act allowed the flag to be moved to a Confederate memorial on the capitol grounds.

Charleston County Councilman Henry Darby protested the flag's location at the chapel entrance of the Citadel and threatened funding cuts.

"It's just still as if they are trying to preserve the Confederacy," he told the Post and Courier newspaper.

A state senator asked for the attorney general's opinion on the matter.

According to legal documents, South Carolina has at least 170 memorials to Confederate soldiers of the U.S. Civil War. The first shots of the war were fired in Charleston in 1861, and South Carolina was the first of the Confederate states to secede from the Union.

"As the flag in the chapel is on public property and we are a state institution, we have a duty to follow the law," retired Lieutenant General Michael Steele, a Citadel board member, said in a statement. "We understand and respect that any flag brings up strong emotions."

(Reporting by Harriet McLeod; Editing by Colleen Jenkins and Eric Beech)

[Confederate Memorial Day via Shutterstock]