SUNBURY-ON-THAMES, England — One was an 18-year-old Iraqi orphan who was known to neighbors of his elderly foster parents as a troublemaker. The other was a 21-year-old from Syria who fled the civil war there and made his way via Egypt to London, where he found work at a fried-chicken shop.

On Monday, the first glimmers of information began to surface about the two young men who are suspects in the crude bombing of an Underground subway train on Friday morning, in what the authorities have called a terrorist attack.

The explosion injured at least 30 people, and although no one was killed, the episode briefly caused Britain to raise its terrorism threat to the highest possible level. The Islamic State said that a “detachment” of its fighters had carried out the attack, but the authorities in Britain have declined to confirm that or provide details of the suspects or what motivated them.

The two young men, who were arrested separately on Saturday, are being held under a law that allows the police to detain suspects without charge beyond the usual four-day limit.