The prime minister however had been able to retain power by maintaining a large, modernized army and politically dominating the court during the minority of King Rajendra Bikram Shah, (reigned 1816–1847).