Harshavarman II (Khmer: ហស៌វរ្ម័នទី២) was an Angkorian king who ruled from 941 to 944. He succeeded his father in 941; however, his reign at Koh Ker was brief and "characterized by conflict".: 73 His uncle, Rajendravarman II, or called Rajendravarman the Reformer conspired against him and took the power away from him and moved the capital back to Yashodharapura. He died in 944 and received the posthumous name of Brahmaloka.: 115
After King Harshavarman II had reigned for only two years, in 944 CE, the Srivijaya-Sailendra dynasty of the Malay Peninsula sailed up the Mekong River, attacked the capital of Koh Ker, captured King Harshavarman II, beheaded him in Srivijaya, and ruled the capital of Koh Ker for three years. His uncle Rajendravarman II drove the Srivijayan army back in 947 CE.