* Little known 33-year-old law graduate becomes interior minister
* Replaces long-term security chief with close ties to U.S.
* Islamic militants pose main internal threat in Saudi Arabia
* New minister, like his uncle, from Nayef branch of Al Saud
* Appointment reassures other royals, young generation
* Part of new batch of young leaders in kingdom's top ranks
DUBAI, June 21 (Reuters) - Saudi Arabia's new interior minister, until now a little-known 33-year-old law graduate, replaces his veteran uncle as security chief at a time when the kingdom is confronting threats posed by Sunni Islamic State fighters and Shi'ite militants in the east.
Prince Abdulaziz bin Saud bin Nayef was appointed on Wednesday to replace Prince Mohammed bin Nayef, who was stripped of his positions and removed as second in line to the throne of the world's biggest oil exporter. King Salman made his son Mohammed bin Salman, 31, his heir and crown prince.
Prince Mohammed bin Nayef, 57, who was wounded in an al Qaeda assassination attempt in 2009, put down an al Qaeda bombing campaign and kept close ties to the U.S. intelligence community where he had a reputation as safe and reliable.
A son of the late Crown Prince Nayef who had served as interior minister since 1975 until his death from a heart attack in 2012, Prince Mohammed had been closely identified with the formidable and effective security structure built by his father.
His replacement by his nephew sidelines Prince Mohammed but keeps the security file in the hands of the Nayef branch of the Al Saud family, which is likely to reassure other royals as power is increasingly consolidated by King Salman and his son.
Mohammed bin Nayef had strong personal support from the security forces and intelligence apparatus, said Jane Kinninmont, a Middle East expert at Chatham House. "The interior ministry thus stays with the descendants of Prince Nayef, but with less experience at the helm," she wrote on Twitter.
Prince Abdulaziz studied in Riyadh before entering private business, but after King Salman ascended to the throne in 2015 he was appointed adviser to the Royal Court for matters including border control, according to Saudi-owned Al Arabiya television. He recently became adviser to the defence minister.
GENERATION OF YOUNG LEADERS
The new interior minister, who attended Dhahran Ahliyyah School and King Saud University, is part of a new batch of young leaders who have rocketed to the kingdom's upper ranks since King Salman took over.
Younger Saudis regard their ascent as evidence their generation is taking a central place in modernising and reforming a country whose patriarchal traditions have for decades made power the province of the older generations.
The interior ministry portfolio will play a key role in implementing the reforms as well as fighting militancy and dealing with dissent at home.
Saudi Arabia follows the ultra-conservative Wahhabi school of Sunni Islam, but sees Islamist militants as posing the biggest threat to its own stability. Islamic State denounces the Al Saud family as ungodly rulers for their alliance with the United States and has staged attacks in the country.
Senior Wahhabi clerics, whose influence in Saudi society forms part of a covenant with the royal family dating back 250 years, endorse execution by beheading for offences that include apostasy, adultery and sorcery, oppose women driving or working and describe Shi'ites as heretics.
The clerics sharply differ, however, from al Qaeda and Sunni militants of Islamic State in opposing violent revolt against the government.
Saudi Arabia crushed a campaign of al Qaeda attacks in 2003-06 but has been hit by Islamic State bombings in the past two years. Saudi security police closely monitor Saudis with suspected connections to militants and have detained more than 15,000 suspects in the years since al Qaeda's campaign.
TAKING THE SECURITY REINS
The new interior minister has little experience compared to his uncle in fighting militancy as he takes the reins of an extensive policing and intelligence apparatus which critics say has been used to stamp out dissent both from Islamists and more secular activists.
Michael Hanna, senior fellow at Washington-based think-tank The Century Foundation, wrote on Twitter that Mohammed bin Nayef's removal also represented "the loss of a long-standing, trusted U.S. (counter-terrorism) partner".
The other main internal security concern in Saudi Arabia is in Qatif, home to about one million mostly Shi'ite Muslims in the oil-producing Eastern Province. Since 2011 frequent protests have shaken the area. While mostly peaceful, Shi'ites angry at what they say is repression of their community have sometimes attacked security forces.
Diplomats and analysts will be keen to establish where the new, young interior minister stands on the big issue facing Saudi Arabia: reconciling social change and a young population with conservative tradition and an oil-dependent economy.
They will also be anxious to see to what extent he sticks with or changes the policies of his uncle in a kingdom where ultimate power lies with the king.
U.S. embassy cables released by WikiLeaks showed Mohammed bin Nayef relatively hawkish on Iran, asking U.S. officials on how best to protect key infrastructure "when at war with Iran".
During his five years in charge of the interior ministry, the government's tolerance for dissent has shown no sign of loosening as a steady stream of activists have been detained and imprisoned on charges that include talking to foreign media. (Reporting By Stephen Kalin, editing by Peter Millership)