While hereditary leader Kim Jong-Un is the unquestioned ruler of North Korea, his uncle Jang Song-Thaek was thought to be the country's second most powerful figure.

The 67-year-old had occupied a privileged and yet precarious spot within the inner circle, and his ties to Mr Kim were more than political.

He was the son-in-law of the founder of North Korea, Kim Il-Sung, and was married to Mr Kim's aunt, Kim Kyong-Hui, the younger sister of the former leader, Kim Jong-Il.

Jang Song-Thaek gestures to leader Kim Jong-Un

A native of the far northeastern border city of Chongjin who hailed from humble roots but was sharp enough to gain entry to prestigious Kim Il Sung University in Pyongyang, he rose from municipal bureaucrat to vice chairman of the National Defence Commission and member of the Political Bureau.

These posts put him second in power only to Mr Kim.

He started his career as instructor for the Pyongyang City Committee of the Workers' Party, and rose post-by-post reaching the top ranks.

Despite not being a career military man, he was made a four-star general, and helped engineer a campaign to bring the once-powerful military into the party's fold.

He was purged and sent to a labour camp for two years in the mid-2000s, according to Kim Young-soo, a North Korea expert at Sogang University in Seoul, South Korea. That purge was widely seen as a move to clip his wings.

It was after Kim Jong-Il's stroke in 2008 that he was assumed to be serving in a regency role while the young heir Mr Kim, then in his late 20s, was being groomed to succeed his father.

Gen Jang would accompany Mr Kim on guidance trips, often dressed in a trim white general's uniform and standing within arm's length of the young heir on field visits and at state events.

That rise to the inner circle gained speed after Kim Jong Il's death from a heart attack in December 2011.

A well-travelled diplomat with a network that spread to China, Gen Jang was considered the chief architect of economic policy that focused on partnering with the neighbour and ally.

He had recently added a new title to his portfolio - chairman of the State Physical Culture and Sports Guidance Commission - one of Mr Kim's pet projects. Mr Kim is a basketball fan and famously invited US basketball star Dennis Rodman for a rare official visit to the country.

Last seen publicly in early November meeting a sports delegation from Japan, rumours of Gen Jang's dismissal began surfacing in Seoul last week.

On Sunday, he was fired from all posts at a special party meeting and dragged away by the arms by soldiers - his ordeal broadcast on North Korean television.

Four days after his dramatic public arrest, Gen Jang was tried for treason by a special military tribunal.

On Friday, North Korea's official news agency KCNA announced he had been executed. He confessed, according to state media.

He was described as "a traitor to the nation" and "worse than a dog".

The list of crimes against Gen Jang was long, with plotting to overthrow the leadership the most serious of the allegations.

Subsequently, pictures showing both Mr Kim and Gen Jang were doctored to remove the uncle - a technique notoriously used by Soviet dictator Joseph Stalin in the 1930s.

Gen Jang's demise offers an intriguing and revealing glimpse into the murky, feudalistic world of politics in the secretive country.

The fall from grace, accompanied by allegations from corruption to womanising and capped by his arrest at the party meeting on Sunday, has suggested to some analysts that Mr Kim is still trying to consolidate the power he inherited from his father two years ago.

For North Koreans, the shocking public humiliation of a man seen as a father figure to Mr Kim was designed to send a clear message about the intolerance of opposition in a totalitarian state that demands absolute loyalty to the leader.