LONDON — The Sudanese man who walked the 31 miles through the Channel Tunnel in August only to be arrested in Britain has been granted asylum and can stay in the country, his lawyers said on Monday.

The man, Abdul Rahman Haroun, had been one of the thousands of migrants and asylum seekers living in camps in Calais, France, seeking to get themselves into Britain, where they believe life will be better for them than at home or elsewhere in Europe.

Mr. Haroun, 40 at the time, is believed to be the first person to make it through the tunnel on foot, although he was arrested by the British on Aug. 4, before emerging into the open air after a walk of some 11 hours.

His extraordinary effort won him considerable publicity, and various nongovernmental groups campaigned to let him stay in Britain, even as the Conservative government has been cracking down on illegal immigrants and trying to persuade its European Union partners to even put limits on the benefits received by legal immigrants to Britain.