Pakistan has a woman on its highest court for the first time.

Ayesha Malik’s swearing-in as a justice on Pakistan’s Supreme Court was a landmark moment for the Islamic nation where women often struggle to get justice, especially in cases involving sexual assault.

Chief Justice Gulzar Ahmad administered Ms Malik’s oath-taking in Islamabad.

The event had been a controversial development for Pakistan’s male-dominated judicial system.

Ms Malik’s appointment, confirmed last week by Pakistani President Arif Alvi, silenced some of her critics who opposed her promotion on technical grounds.

Congratulations flowed from the top, with prime minister Imran Khan tweeting of Ms Malik, 55, “I wish her all the best.”

Pakistani Senator Sherry Rehman shared a photo of Ms Malik’s oath-taking on Twitter.

Foreign Minister Shah Mahmood Qureshi also tweeted, saying Ms Malik’s swearing in was “a great day for Pakistan”.

The process to elevate Ms Malik from the Punjab provincial high court, which she joined in 2012, had been unusually contentious.

A nine-member judicial commission recommends judges for promotion.

Five members of the commission supported Ms Malik’s appointment, while the other four opposed it.

Ms Malik’s allies hope her appointment clears the way for more promotions of women in Pakistan’s courts.

Women in Pakistan struggle to get justice, especially in cases involving sexual assault.

Authorities and society cast doubt on the victims in many cases.

Ms Malik previously worked at the Lahore High Court, the second highest court in judicial system.

According to the Supreme Court’s web site, Ms Malik received her early education from schools in Paris and New York, and later earned her law degree from Harvard Law School, where she was named a London H. Gammon Fellow for outstanding merit.