A 21-year-old former university student has been arrested and charged with arson and a hate crime in connection with a large burning cross that was found last week in Grant Park in downtown Chicago, the police said.

The former student, Merlin Lu, who recently attended the University of Illinois Chicago, was arrested in the city on Monday after the authorities identified him as the person who had started the fire, the Chicago Police Department said in a statement on Wednesday.

The charges against Mr. Lu include two felony counts of committing a hate crime, one felony count of damaging city property and one felony count of arson.

At a detention hearing on Thursday, Judge D’Anthony Thedford of Cook County Circuit Court granted Mr. Lu pretrial release, though he forbade him from buying “items used to start a fire such as wood or kerosene,” according to the Cook County state’s attorney’s office.

Elizabeth Dibler, an assistant state’s attorney, said at the hearing that Mr. Lu built the cross himself using nails and a hammer after arriving at Grant Park on the afternoon of June 9. He then wrapped the cross in toilet paper, doused it with a gallon of kerosene, leaned it against a tree and set it on fire, resulting in roughly $1,800 worth of damage to the tree, Ms. Dibler said.

After finding a kerosene bottle cap at the scene, investigators eventually determined that Mr. Lu purchased the bottle and a lighter at Home Depot store on May 31, according to Ms. Dibler.

Efforts to reach Mr. Lu and his lawyer were not successful. Mr. Lu has no criminal record, according to prosecutors.

A spokesman for the University of Illinois Chicago, Brian Flood, said that a Merlin Lu had attended the school but had not been enrolled there since last fall. Mr. Flood said he would not be able to provide further information, citing the investigation into the cross burning.

In an interview with NBC 5 in Chicago before his arrest, Mr. Lu claimed responsibility for constructing the wooden cross and setting it on fire, but said he had done so to protest the Trump administration, not as an act of racism.

Burning crosses have long been associated with the Ku Klux Klan and are viewed as symbols of racial violence and hatred.

Mr. Lu told the station that while he had understood the “historical relevance” of a burning cross before his protest, he had not grasped “the severity” of the symbol. His act, he said, had “nothing to do with race” and was not a hate crime, and he apologized if he had offended anyone.

Mr. Lu claimed instead that he had meant to protest Christian nationalist supporters of President Trump and his administration’s “ruling class,” according to NBC 5. He said he had placed a red baseball cap on top of the cross to symbolize a MAGA hat.

The White House did not immediately respond to a request for comment.

Officers responded on June 9 to an area of Grant Park near the intersection of South Columbus Drive and East Balbo Drive, where they discovered “an object on fire,” the Police Department said. The Chicago Fire Department extinguished the blaze and no one was hurt, the police said.

The police released images last week of what they said was a person who had been observed fleeing the area where the cross was set on fire.

The burning cross, videos of which circulated online, drew an outraged response from some local officials and faith leaders.

“That symbol of hatred is one that we must continue to reject and I wholeheartedly reject it,” Mayor Brandon Johnson told reporters this week. “I can’t speak to anyone’s motives; I can only speak to the impact, and the impact was devastating.”

The mayor’s office did not immediately respond to a request for comment on Thursday.

Last week, the Rev. Michael Pfleger, a community activist and a senior pastor at the city’s Saint Sabina Church, called the burning cross “a historic symbol of terror, fear, and racial hatred.” The church offered a $10,000 reward “for information leading to the arrest and conviction of the individuals involved.”

In an interview on Thursday, Father Pfleger said there was “no way in the world” that Mr. Lu had failed to understand the full meaning of a burning cross and that he deserved to be charged with a hate crime. He said the reward offer was still valid.

“No one’s going to pass a burning cross and think that’s a Trump protest,” Father Pfleger said.

Francesca Regalado contributed reporting.