A man wielding an ax on a street crowded with soccer fans was shot by the police on Sunday in Hamburg, Germany, only hours before the city was to host a game at the European Championship.

The man threatened police officers with “a pickax and an incendiary device,” a police spokesman said on Sunday. When he did not respond to warnings, the police said, he was shot.

The man was injured and was being treated, they confirmed. No fans or police officers were injured.

The incident took place in Hamburg’s entertainment district, a section of the city known as the Reeperbahn that is filled with restaurants and bars. At the time, the area was packed with thousands of fans who had arrived to see the Netherlands play Poland on Sunday afternoon.

According to a spokeswoman for the Hamburg police and videos of the incident posted online, the man came out of a small restaurant with a small, double-bladed ax and a firebomb and threatened officers nearby.

Standing behind a police barrier as fans watched only steps away, the man — dressed all in black — shouted and moved toward a group of about a dozen police officers, several of whom were pointing their weapons at him from either side of the barrier. He held the small ax in one hand and what appeared to be a bottle with a rag in its neck in the other.

When a police officer sprayed pepper spray in the man’s direction, he turned and began running up the street as fans scattered out of his path. Officers moved to surround him a short distance up the narrow street, and then at least four shots rang out.

The police said that the man had been injured, but they could not give further updates on his condition. He was placed in an ambulance after the shooting and driven away.

The site of the shooting was a 10-minute walk from the city’s official fan zone, which was thronged with many more thousands of fans at the time, and a short train ride from the 57,000-seat Volksparkstadion, where the Netherlands and Poland were to meet in the first of three tournament games set for Sunday.

The gunshots, captured in several videos of the incident that were quickly posted online, were a sudden and jarring intrusion into what had been a festive lunchtime atmosphere. Within minutes, scores of police officers had gathered and set up a cordon around the scene of the shooting, and loudspeaker announcements — and the looming kickoff — cleared the area.

The shooting came on the third day of the monthlong tournament, which brings together the continent’s best 24 teams every four years.

world