TOKYO — In a ghastly spectacle of a sort rarely seen in this orderly city, a man set himself on fire in front of horrified crowds at Tokyo’s busiest train station on Sunday in what appeared to be a lone protest against efforts to weaken Japan’s antiwar Constitution.

The police provided few details about the man, who survived with burns all over his body after being rushed to a Tokyo hospital. Firefighters appeared either to have been warned or to have discerned the man’s intentions, because they were on hand to douse him quickly with water once he set himself on fire with a liquid that looked like gasoline.

The self-immolation took place in broad daylight in front of hundreds of onlookers, who used cellphones and other devices to post graphic videos and photos of it on social media sites.

The images show a thin, middle-aged man in a dark suit who sat cross-legged atop the scaffolding of a pedestrian bridge in front of the busy Shinjuku train station.