Two explosions ripped through crowds of Afghans trying to enter Kabul airport on Thursday, causing multiple casualties and disrupting the final push of the U.S.-led evacuation effort.

At least three U.S. troops were injured, a U.S. official said. Witnesses reported multiple fatalities among the Afghans, many of whom were trying to enter the airport because they had assisted U.S.-led coalition efforts and feared persecution by the Taliban.

Western governments have repeatedly warned of an imminent attack by Islamic State and urged their citizens not to approach the airport. After the blasts, the U.S. Embassy told all Americans to leave the entrances to the airport immediately.

The explosion at the Abbey Gate of the airport was the result of a complex attack, Pentagon press secretary John Kirby said. He said another blast occurred near the Baron hotel adjacent to the airport. A British security official said both attacks were carried out by suicide bombers.

One of the injured in Kabul on Thursday.

Photo: Ali Hassani/Storyful

An Afghan man who was attempting for the fifth time to get into the airport and get on one of the evacuation planes was standing in the crowd outside Abbey Gate when the detonation took place. “A lot of people got hurt,” he said by phone. “I helped a little girl. I think she died.”

Another Afghan man who was on the edge of the crowd near the Baron hotel said the explosion there occurred in the middle of thousands of people. He said he saw many maimed, bloodied people being brought out and was told of many fatalities.

Photos purportedly from near the site of the explosion showed civilians transporting injured, bloodied people in wheelbarrows. Kabul’s Emergency Hospital, which is run by an Italian organization, said 30 patients had arrived at its surgical center, including six who were dead on arrival.

A doctor at the Indira Gandhi Hospital in Kabul said he admitted five people injured in the blasts, one of whom, a ten-year-old girl, died.

Separately, Italy said that its C-130 aircraft filled with Afghan refugees came under fire at takeoff on Thursday, but wasn’t damaged. An Italian reporter aboard the plane said the pilot had to take evasive action.

Thursday’s explosion came after several of America’s allies said they were halting evacuation flights from Afghanistan, leaving behind citizens and thousands of Afghans who had been cleared for entry.

Injured people arrived at a hospital in Kabul on Thursday.

Photo: asvaka news/Reuters

Airlift opportunities began disappearing amid warnings of an imminent terrorist attack, and as the U.S. began winding down operations in Kabul ahead of the Aug. 31 withdrawal deadline. Desperate Afghans and foreign citizens still tried to reach Kabul’s international airport but on Thursday morning found the roads blocked by Taliban checkpoints.

“Everything is over,” said a 30-year-old teacher who tried to get to the airport. “They’re not letting anyone pass, not even those with foreign passports or visas.”

Thousands of Western citizens and permanent residents are still stranded in Afghanistan, and many fear that they will now be abandoned to face possible Taliban retribution. Secretary of State Antony Blinken said Wednesday that approximately 1,500 American citizens were still in Taliban-controlled Afghanistan, and that Washington was in touch with some 500 of them, trying to organize evacuations.

For many Afghan evacuees who are able to board a flight out of Kabul, the long journey to their host countries is just beginning. WSJ’s Michelle Hackman explains the steps in the resettlement process and the challenges as they start new lives. Photo: Jesus Hellan/Zuma Press The Wall Street Journal Interactive Edition

Bismillah, a green-card holder residing in Sacramento, Calif., said he traveled to the northern Afghan city of Mazar-e-Sharif to visit his parents Aug. 3 with his wife, also a U.S. permanent resident, and their 8-month-old son, a U.S. citizen. The family made their way to Kabul as the Afghan government collapsed on Aug. 15, but Bismillah, who declined to provide his last name, said he feared that his baby would be crushed to death in the crowds and didn’t try to reach the airport.

“I feel like we are going to be left behind. I don’t know what is going to happen next week—you cannot forecast even one day about what will happen in Afghanistan,” said Bismillah, who worked for Amazon.com Inc. in California and is currently in Mazar-e-Sharif. “We are really worried about ourselves.”

The U.K. late Wednesday warned its citizens to stay away from the airport because of the risk of an attack. The Foreign Office said in official advice for travelers that people shouldn’t go to the airport and, if already there, should leave.

Hundreds of people gathered, some holding documents, near an evacuation control checkpoint on the perimeter of the airport on Thursday.

Photo: Wali Sabawoon/Associated Press

“The credibility of the reporting has reached the stage where we believe there is a very imminent, a highly lethal attack, possibly within Kabul,” James Heappey, the U.K.’s armed forces minister, said in a broadcast interview earlier Thursday.

The evacuations are ending as the Taliban cement their hold over the country. Though the Islamist movement’s leaders have met with prominent figures from the fallen Afghan republic, such as former President Hamid Karzai and chief peace negotiator Abdullah Abdullah, the visits were mostly courtesy and didn’t discuss power sharing, a person familiar with the meetings said. Mr. Karzai, in particular, had been strongly advised not to leave his compound for his own safety, a soft form of house arrest, the person said.

Since Aug. 14, the day before the Taliban took control of Kabul, the U.S. has evacuated and facilitated the evacuation of approximately 95,700 people from Afghanistan, the White House said. In the 24 hours ending at 3 a.m. ET Thursday, about 13,400 people were evacuated, approximately 5,100 of them on U.S. military flights, it said.

The Dutch Defense Ministry said in a letter Thursday to parliament that it would stop flight operations by the end of the day, hoping to evacuate several hundred people already inside the airport, with diplomatic staff and Dutch troops departing on the final flight. The ministry added that it was no longer able to assist its citizens and eligible Afghans in accessing the airport.

“This is a painful moment because it means that despite all the great efforts of the past period, people who are eligible for evacuation to the Netherlands will be left behind,” the letter said. Those include Dutch citizens and Afghans who had worked with Dutch forces deployed as part of the U.S.-led coalition.

A U.S. soldier held a sign indicating that a gate was closed as hundreds of people gathered at the airport on Thursday.

Photo: Wali Sabawoon/Associated Press

Poland, which has flown more than 900 Afghan citizens since the fall of Kabul, said it was also ending its evacuation program following decisions made by its allies, the U.S. and the U.K. “The situation is difficult, it is even dramatic, and more and more difficult with each hour,” Prime Minister Mateusz Morawiecki said Thursday.

The Italian Defense Ministry said its last flight would leave Kabul on Thursday night. Canada, too, said it had ended its evacuation effort. French Prime Minister Jean Castex told French radio RTL that the country would no longer be able to evacuate citizens after Friday. Danish Defense Minister Trine Bramsen said Wednesday that Denmark had already flown its last evacuation flight, and that it was no longer safe to fly in and out of Kabul. U.K. Defense Secretary Ben Wallace said in a broadcast interview that the country has 11 flights scheduled for Thursday but declined to say whether those would be the last, citing the need to protect troops on the ground.

Write to Yaroslav Trofimov at yaroslav.trofimov@wsj.com and Sune Engel Rasmussen at sune.rasmussen@wsj.com