At the front of an Illinois mosque, a short white coffin was draped in a Palestinian flag.
The boy inside, a Lego-loving, 6-year-old soccer fan named Wadea Al-Fayoume, was too young to have understood the complicated politics of the place his Palestinian parents left behind, or of this country where he was being raised. But, the authorities in suburban Chicago said, he became a casualty of those divisions nonetheless.
Wadea, who should have been at school on Monday, was instead mourned by an enormous crowd that filled the large mosque in Bridgeview, Ill., and spilled outside. Prosecutors said that he was stabbed to death over the weekend in an attack motivated by hate for Muslims amid the fighting in Israel and Gaza. A short drive away from the mosque, Wadea’s 71-year-old landlord, who was charged in his killing, was making his initial appearance in court.
Family members and friends remembered Wadea as a kind child who loved swimming, jumping and playing games, and celebrated his birthday only days ago. Wadea’s mother, Hanan Shaheen, who was seriously injured in the attack, was still recovering and not able to attend the funeral, according to Ahmed Rehab, the executive director of the Chicago office of the Council on American-Islamic Relations.
“This is a heavy day that we hoped would never come. As they say, the smallest coffins are the heaviest,” Mr. Rehab said.
The killing on Saturday drew condemnations from President Biden and Attorney General Merrick B. Garland, as well as outpourings of grief from Muslim leaders across the country, many of whom saw the attack as an outgrowth of overheated or one-sided rhetoric about the fighting overseas.
In interviews at the mosque and at a news conference before the funeral, Muslims described their frustration with politicians, including Mr. Biden, who had voiced support for Israel, and with American journalists, who they said often took Israel’s side and did not fully reflect the humanity of Palestinian people.
Since the start of the fighting overseas, and especially since the stabbing over the weekend, several Muslims in the Chicago area said they feared increasingly for the physical safety of their families.
Fariz Burhanuddin, 37, who is Muslim of Indian heritage, said he and his wife were struggling with how to talk to their own young son about the stabbing.
“I’m searching for the words,” he said. “How do you tell a 5-year-old about something like this?”
At the same time mourners were gathering in Bridgeview, the man accused of the killing was appearing in court in Joliet, Ill., about 30 miles away.
In court documents, prosecutors described the landlord, Joseph M. Czuba, as angry, erratic, paranoid and violent. He has been charged with murder and hate crimes.
Mr. Czuba, 71, had been listening to conservative radio coverage of the Middle East war in the days before the attack, prosecutors said, and wanted his Palestinian American tenants to move out of his building. He was increasingly concerned that he was in personal danger because of his connection to them, they said.
Judge Donald W. DeWilkins ordered Mr. Czuba held in jail without the possibility of release. Mr. Czuba appeared in court hunched and disheveled with matted hair, and answered quietly with “Yes, sir” when questioned by the judge.
He faces charges of first-degree murder, attempted first-degree murder, two counts of a hate crime and aggravated battery with a deadly weapon. In court, Mr. Czuba requested a public defender.
Outside the Bridgeview mosque where the funeral was held, large crowds gathered, their cars filling the parking lot and spilling into side streets. Police officers from across the Chicago area were stationed on the streets surrounding the mosque.
After the charges were announced, officials in Illinois and Washington swiftly issued statements condemning the attack. Mr. Biden said that he was “shocked and sickened” and that “this horrific act of hate has no place in America.” Gov. J.B. Pritzker of Illinois, a Democrat, said that “to take a 6-year-old child’s life in the name of bigotry is nothing short of evil.”
Mr. Garland announced a federal hate crimes investigation and said that “this incident cannot help but further raise the fears of Muslim, Arab and Palestinian communities in our country with regard to hate-fueled violence.” The F.B.I. said it was working the case.
“No one in the United States of America should have to live in fear of violence because of how they worship or where they or their family come from,” Mr. Garland added.
Mr. Czuba had rented two rooms in his home in Plainfield Township, about 40 miles southwest of downtown Chicago, to Ms. Shaheen, 32, and her son. On Saturday, the morning of the attack, Ms. Shaheen told investigators, Mr. Czuba knocked on her bedroom door and told her that he was angry about the war in Israel.
“Let’s pray for peace,” she responded, according to investigators.
But Mr. Czuba immediately attacked with a knife, forcing her to flee to a bathroom and lock herself inside, where she called 911. After the police arrived, her son was found stabbed 26 times and unresponsive in his bedroom.
Mary Czuba, Mr. Czuba’s wife, told investigators that he had recently become very interested in the conflict in the Middle East and was worried that Ms. Shaheen was going to “call over her Palestinian friends or family to harm him,” according to prosecutors.
Ms. Czuba also told the authorities that her husband had made a cash withdrawal of $1,000 to prepare for the electrical grid failing in the United States.
Suburban Chicago has a large Palestinian American community, including an area with many Arab restaurants and shops that some refer to as Little Palestine. The attack on Saturday happened in a different part of the suburbs, in a home along a busy stretch of highway near a Chevrolet dealership and a barbecue restaurant. The property was adorned with several American flags, an advertisement for organic honey and a sign asking people to pray to end abortion.
A neighbor, Mariola Jagodzinski, who lives two houses away, described Wadea as “a playful child — really full of energy.” She said she had helped Mr. Czuba build a treehouse for the boy a couple of years ago.
“I cannot imagine what the parents are going through,” she said. “As a parent, this is heartbreaking.”
The assault on Saturday came amid increasing violence between Israel and Hamas, the Palestinian group that controls the Gaza Strip.
On Oct. 7, Hamas unleashed a surprise attack against Israel that left more than 1,400 Israelis dead, prompting intense retaliation that has killed about 2,800 people in Gaza, according to officials there. Across the Middle East, fears of a widening conflict and worsening humanitarian crisis were mounting.
Within the United States, Muslim and Jewish congregations have stepped up security, and law enforcement officials have said they are monitoring for potential hate crimes and other attacks.
Brendan Kelly, the director of the Illinois State Police, said everyone in his state “must remain on guard against both terrorism and hate crimes during this period of volatility.”
At the mosque where Wadea was mourned, many said they hoped the boy’s death would force a recalculation of the American discourse on Israelis and Palestinians. The alternative, they feared, could be a return to the days after the terrorist attacks of Sept. 11, 2001, when Muslims across the country were victims of hate crimes and worried about their safety.
“Have we not learned anything from 9/11?” Imam Omar Suleiman said outside the mosque. “Do we really want to live those dark years again?”
Johnny Diaz and Aida Alami contributed reporting. Jack Begg contributed research.