BRUSSELS (AP) — Bombs exploded at the Brussels airport and one of the city's metro stations Tuesday, killing at least 31 people and wounding dozens, as a European capital was again locked down amid heightened security threats. The Islamic State group claimed responsibility for the attacks. The two airport blasts, at least one of them blamed on a suicide bomber, left behind a chaotic scene of splattered blood in the departure lounge as windows were blown out, ceilings collapsed and travelers streamed out of the smoky building. About an hour later, another bomb exploded on a rush-hour subway train near the European Union headquarters. Terrified passengers had to evacuate through darkened tunnels to safety. "What we feared has happened," Belgian Prime Minister Charles Michel told reporters. "In this time of tragedy, this black moment for our country, I appeal to everyone to remain calm but also to show solidarity." Belgium raised its terror alert to the highest level, diverting planes and trains and ordering people to stay where they were for most of the workday. Airports across Europe immediately tightened security. "We are at war," French Prime Minister Manuel Valls said after a crisis meeting in Paris. "We have been subjected for the last few months in Europe to acts of war." Added French President Francois Hollande: "Terrorists struck Brussels, but it was Europe that was targeted, and it is all the world which is concerned by this." European security officials have been bracing for a major attack for weeks, and warned that the Islamic State group was actively preparing to strike. The arrest Friday of Salah Abdeslam, a key suspect in the November attacks in Paris, heightened those fears, as investigators said many more people were involved than originally thought and that some are still on the loose. The Islamic State group claimed responsibility for the Brussels attacks, saying in a posting on the group's Amaq news agency that its extremists opened fire in the airport and "several of them" detonated suicide belts. It said another suicide attacker struck in the subway. The posting claimed the attack was in response to Belgium's support of the international coalition arrayed against the group. Michel said there was no immediate evidence linking the attacks with Abdeslam. After his arrest, Abdeslam told authorities he had created a new network and was planning new attacks. U.S. President Barack Obama pledged to "do whatever is necessary" to help Belgian authorities seek justice. "We stand in solidarity with them in condemning these outrageous attacks against innocent people," Obama said in Havana, where he was closing a three-day visit. Western Europe has lived for decades under the threat of violence from homegrown nationalist and revolutionary movements. Muslim extremists from North Africa and the Middle East have attacked civilian targets without warning, ranging from France's 1960s war in Algeria through Libya's 1988 downing of an airline over Scotland to the 2004-05 attacks on the public transportation systems of London and Madrid. Certain neighborhoods in Brussels, like the Molenbeek quarter, have bred extremists and supplied foreign fighters. Plotters linked to the Paris attacks and others have either moved through or lived in parts of the city. Tuesday's explosions at the airport in the Brussels suburb of Zaventem came shortly after 8 a.m., one of its busiest periods. Belgian Health Minister Maggie de Block said 11 people were killed and 81 wounded. Eleven people had serious injuries, Marc Decramer of the Gasthuisberg hospital in Leuven told broadcaster VTM. The nails apparently came from one of the bombs. Zach Mouzoun, who arrived on a flight from Geneva about 10 minutes before the first blast, told BFM television that the second, louder explosion brought down ceilings and ruptured pipes, mixing water with victims' blood. "It was atrocious. The ceilings collapsed," he said. "There was blood everywhere, injured people, bags everywhere." "We were walking in the debris. It was a war scene," he said. Video taken moments after the explosions showed travelers huddled next to airport check-in counters and lying near luggage and trolleys as dust and the cries of the wounded filled the air. Dazed people stumbled from the scene, some with clothes and shoes blown off. Anthony Deloos, an airport worker for Swissport, which handles check-in and baggage services, said the first explosion took place near the Swissport counters where customers pay for overweight baggage. He and a colleague said the second blast hit near a Starbucks cafe. "I jumped into a luggage chute to be safe," Deloos said. The bomb on the subway train came after 9 a.m., killing 20 people and wounding more than 100, Mayor Yvan Majeur said. "The metro was leaving Maelbeek station for Schuman when there was a really loud explosion," said Alexandre Brans, 32, wiping blood from his face. "It was panic everywhere. There were a lot of people in the metro." Near the entrance to the station, rescue workers set up a makeshift medical treatment center in a pub. Dazed and shocked morning commuters streamed from the metro entrances as police tried to set up a security cordon. The airport was ordered closed for the rest of the day and CEO Arnaud Feist said the facility would be closed all of Wednesday and perhaps even longer. More than 200 flights to Brussels were diverted or canceled, according to flight tracking service Flightradar24. The metro also was ordered closed as the city was locked down. By the end of the workday, city officials said residents could begin moving around on the streets of the capital and train stations were reopening. But Peter Mertens of the Belgian crisis center said the threat of more attacks "is still real and serious." At least one and possibly two Kalashnikovs were found in the departure lounge at the airport, according to a European security official in contact with a Belgian police official who spoke on condition of anonymity because he was not authorized to talk about the ongoing investigation. It was not immediately clear whether the firearms were used in the attacks. Travelers fled the airport as quickly as they could. In video shown on France's i-Tele television, men, women and children dashed from the terminal in different directions. Security officers patrolled a hall with blown-out paneling and ceiling panels covering the floor. Marc Noel, 63, was about to board a Delta flight to Atlanta, to return to his home in Raleigh, North Carolina. A Belgian native, Noel said he was in an airport shop buying automotive magazines when the first blast struck about 50 yards away. "People were crying, shouting — children. It was a horrible experience," he said, adding that his decision to shop might have saved his life. "I would probably have been in that place when the bomb went off."