Pakistani physics professor Abdus Salam in London in 1979. He was joint winner of the Nobel Prize for Physics that year. Salam died in 1996 in London. (AP)

In most countries, it would hardly require an act of courage for the government to rename a university science center after a native-born Nobel Prize-winning physicist who died two decades earlier.

But the belated honor that Pakistan announced Tuesday for the late Abdus Salam was a bold step in the ­Muslim-majority democracy, where officials often feel the need to appease religious hard-liners at the expense of progress and international stature.

Salam was a member of the Ahmadiyya community, a minority sect that is ostracized and reviled by many Muslims in Pakistan, and whose schools and places of worship have been the frequent target of attacks.

So touchy are Pakistan’s majority Sunnis about Ahmadis — who consider themselves Muslims but are widely viewed as heretics — that the decision to add Salam’s name to the National Center for Physics is the first official honor he has received in his homeland. Salam won the Nobel in 1979, sharing it with two theoretical physicists from the West. He died in 1996 in London.

“The government should be congratulated for correcting a historic injustice,” said Pervez Hoodbhoy, a professor of physics at Quaid-i-Azam University, where the center is located.

The move shows that Pakistan is finally “ready to move ahead in science . . . irrespective of faith,” Hoodbhoy said. “It will help soften Pakistan’s image, which is badly needed when we are accused of being intolerant and terrorist.”

But even as Prime Minister Nawaz Sharif issued a statement saying Salam’s “remarkable achievements earned fame and prestige for the country” and “deserve to be valued,” critics were cursing the physicist in online posts as a “thug,” a spy and a “traitor to Islam.” Salam left Pakistan in the 1970s after its legislature declared Ahmadis to be non-Muslims, and he worked from then on in the West.

Other Pakistanis, while praising Sharif for taking a step no previous government leader had risked, said it meant little as long as members of the country’s 4­-million-strong Ahmadi minority are still persecuted. 

“This is indeed welcome news, but can the prime minister explain to us why the Ahmadi community is being hounded, beaten, jailed and brutalized?” one woman commented on Facebook.

In the past several years, Ahmadis have faced deadly attacks, some by local Muslims whipped up by conservative Islamist preachers and others carried out by terrorists. In 2010, suicide attackers from a Sunni militia killed 94 people and wounded more than 120 in simultaneous assaults at two Ahmadi community centers in Lahore.

Last month, a more subtle but damaging episode took place: a whisper campaign suggesting that one of the top candidates to become the army chief had family ties to Ahmadis.

The rumors — later proven false — died down quickly and were reported only obliquely by the Pakistani press. But the incident illustrated the persistent depth and power of animosity toward Ahmadis, whose sect was founded in India and claims that another historical figure instead of Muhammad was the last prophet.

Based on a video, the rumors sprang up as Sharif was about to choose among four generals to replace the army chief. They insinuated that one of the candidates, Lt. Gen. Qamar Javed Bajwa, had relatives who were Ahmadi. The suggestions threatened to undermine his candidacy at a critical moment. 

Sharif selected Bajwa for the post anyway. But while some commentators denounced the anonymous smear campaign, the language of their criticism was telling. 

One prominent columnist, Syed Talat Hussain, slammed the campaign as “a vile act,” a “sensational falsehood” and the “ultimate slander.” Hussain did not directly refer to Ahmadis, but his hyperbolic tone underscored the widespread suspicion facing the group.

The beginning of Salam’s official rehabilitation in Pakistan, a country desperately in need of academic role models and modern heroes, comes years after he was recognized for his contributions in the West. Pakistan did not have another Nobel laureate until 2014, when Malala Yousafzai won the peace prize.

As a schoolgirl in 2012, Yousafzai survived a terrorist attack and went on to become an eloquent advocate for girls’ education and women’s rights.

One Facebook post Tuesday quoted an imaginary letter from Salam to Yousafzai written the day after she won the Nobel.

It read: “Now, the mantle passes to you, dearest child. And with it, I regret to pass onto you the heart-wrenching burden it brings.”