SEOUL, South Korea  Former President Jimmy Carter was expected to leave North Korea on Friday with Aijalon Mahli Gomes, an American who was sentenced to eight years of hard labor for illegally entering the country, the Carter Center said.

Mr. Gomes was granted amnesty by the North Korean leader, Kim Jong-il, the Carter Center said in an e-mail. “It is expected that Mr. Gomes will be returned to Boston, Mass., early Friday afternoon, to be reunited with his mother and other members of his family,” the statement said.

Mr. Carter had been visiting Pyongyang, the North Korean capital, on a private humanitarian mission to win the release of Mr. Gomes, who was sentenced in April to eight years in a North Korean prison and fined $700,000 for entering the country illegally. There has also been speculation that North Korea might try to use Mr. Carter as a conduit to ease tensions with the United States.

Mr. Carter had arrived on Wednesday at the invitation of the North Korean government, but it was not known whether he met with Mr. Kim, the North Korean leader.