North Korea has released two American journalists who have been imprisoned in the country for months, and they are on their way back to the United States.  

The move comes after former U.S. president Bill Clinton arrived in the country in an attempt to secure the release of 32-year-old Laura Ling and 36-year-old Euna Lee, the two American journalists who were arrested along the North Korean-Chinese border in March.

A spokesperson for Clinton said the former president and the two journalists are en route to Los Angeles as of Tuesday evening.

The release of the journalists was a sign of North Korea's "humanitarian and peaceloving policy," the state-run Korean Central News Agency said.

The country's reclusive leader Kim Jong Il agreed to pardon the women after meeting with Clinton Tuesday.

The two women were accused of sneaking into North Korea and committing "hostile acts." They had been reporting on women and children who had defected into China from North Korea at the time of their arrest.

Both were sentenced to 12 years of hard labour in June. It is believed that U.S. officials have been working on securing their release ever since.

Clinton made a surprise visit to Pyongyang on Tuesday after arriving in the North Korean capital on an unmarked private jet. He was there to secure the release of Ling and Lee.

In Pyongyang, he was greeted by Vice Foreign Minister Kim Kye Kwan, as well as by North Korea's deputy speaker of parliament.

State-run media reported that Clinton and the North Korean leader had "exhaustive" talks, including a "wide-ranging exchange of views on matters of common concern."

It was also reported that Kim thanked Clinton for "courteously" delivering a verbal message from U.S. President Barack Obama, though White House Press Secretary Robert Gibbs denied that a message had been sent.

Clinton's trip to North Korea was not publicly announced, though his arrival was confirmed to reporters by a senior U.S. official earlier Tuesday.

Also on Tuesday, Gibbs said Obama would make no comment "while this solely private mission to secure the release of two Americans is on the ground."

There was some hope that, if successful, Clinton's visit to Pyongyang could help the U.S. and North Korea move closer together on other diplomatic issues, including the country's controversial nuclear program.

"This is a very potentially rewarding trip. Not only is it likely to resolve the case of the two American journalists detained in North Korea for many months, but it could be a very significant opening and breaking this downward cycle of tension and recrimination between the U.S. and North Korea," said Mike Chinoy, author of "Meltdown: The Inside Story of the North Korean Nuclear Crisis."

In the U.S., Republican Senator Lindsey Graham also expressed hope that Clinton's trip to Pyongyang could yield other dividends, beyond the release of the two American journalists.

"Maybe we can build on this and do something better with nuclear weapons," Graham said Tuesday during an interview with NBC television. "I don't know if this is the beginning of something bigger."

CTV's Joy Malbon said that Clinton's visit to Pyongyang was more than just a photo-op for the North Korean leader.

"This legitimizes North Korea," Malbon told CTV News Channel from Washington. "This gives them what they've always wanted from the United States and that's respect."

Tuesday's visit was Clinton's first trip to North Korea, though his administration had relatively good relations with Pyongyang.

In 2000, former U.S. secretary of state Madeline Albright visited Pyongyang and New Mexico Gov. Bill Richardson, travelled to North Korea twice in the 1990s to secure the release of detained Americans.

Both Richardson and former vice president Al Gore had been named as possible envoys to North Korea to bring back Lee and Ling.

U.S. relations with North Korea deteriorated during the two terms served by former U.S. president George W. Bush.

Ling and Lee were working for the California-based Current TV at the time of their arrest.

The families of the detained journalists had pleaded for their release, citing the fact that Lee has a young daughter and Ling has a medical condition.

Laura Ling is the sister of Lisa Ling, a reporter who is a special correspondent for the Oprah Winfrey Show and a former co-host of "The View."

With files from CTV News Channel and The Associated Press