After a 17-year legal battle between the city and a self-described atheist, a judge has ordered San Diego officials to remove a giant cross from a hilltop park.

The 29-foot-high cross was dedicated as a memorial to Korean War veterans in 1954 on a hilltop that towers over seaside La Jolla.

Philip Paulson, an atheist and Vietnam veteran, has been challenging its placement on city-owned parkland since 1989. He declined comment on the ruling Wednesday, but his attorney, James McElroy, said he hoped city officials would finally back down.

U.S. District Judge Gordon Thompson Jr. gave the city 90 days to comply with a 1991 injunction forbidding the cross on public property or start paying $5,000 a day in fines.

"It is now time, and perhaps long overdue," the judge wrote.

Defying the order is something cash-strapped San Diego can ill afford. Its pension fund is more than $1 billion in debt, the federal government is investigating, and there has been talk of bankruptcy.

Still, Mayor Jerry Sanders said he would ask the city attorney to appeal.

The city has tried to sell the half-acre beneath the cross to a nonprofit association that maintains the surrounding memorial walls. But federal judges have repeatedly blocked the sale, saying the transactions were designed to favor a buyer who would keep the cross in place. The U.S. Supreme Court refused to hear the city's appeal in 2003.

A city-sponsored referendum asking permission from residents to sell the property failed in 2004. The next year, 75 percent of the voters approved a referendum to transfer the land to the federal government, but a Superior Court judge ruled that measure to be an "unconstitutional aid to religion." The ruling has been appealed.