Pakistan has readied its military and alerted its hospitals to stand by to receive wounded troops as tensions rise in anticipation of war with its nuclear rival, India.

A Pakistan-based Muslim separatist group carried out a massive terror attack in Indian-administered Kashmir, a contested region the two countries have already fought two wars over.

India and Pakistan both built nuclear arsenals to counter each other and now appear to be on the brink of war.

Statements from China and the US indicate the two larger nuclear powers may already be picking sides in a potential fight.

Pakistan has readied its military and alerted its hospitals to stand by to receive wounded troops as tensions rise after India, its nuclear rival and neighbor, unleashed its military to exact vengeance after a terror attack in Kashmir left 44 dead.

India and Pakistan both claim the border region of Kashmir but administer different parts of the disputed territory the countries have already fought two wars over.

The Muslim separatist group Jaish-e-Mohammed, which is based in Pakistan, took responsibility for the terror attack, but India has accused Pakistan of having official involvement.

Indian Prime Minister Narendra Modi responded to the attack by saying his country's "blood boils" and he had set the military free to respond however it saw fit.

Pakistan then wrote to hospitals on February 20 to arrange a plan for medical support in the event that fighting breaks out, The Times of India reported.

The letter called for hospitals to earmark 25% of their beds for injured soldiers, to prepare to expand their capacity to house patients, and to plan on shifting them around and away from the front lines during fighting, according to The Times of India.

"We have no intention to initiate war, but we will respond with full force to full spectrum threat that would surprise you," Pakistan army spokesman Major General Asif Ghafoor told Reuters from the city of Rawalpindi. "Don't mess with Pakistan."

Nuclear rivals on the brink

A Pakistani-made Shaheen-III missile, which is capable of carrying nuclear warheads. Anjum Naveed/AP

The UN on Friday "condemned in the strongest terms the heinous and cowardly suicide bombing" in Kashmir and called out Jaish-e-Mohammed by name.

Pakistan banned Jaish-e-Mohammed in 2002, but it knew exactly where to find the terror group on Friday. Authorities "took control" of the terror group in Bahawalpur and appointed an administrator to look after its affairs, according to its government.

Jaish-e-Mohammed headquarters hosted a seminary with 600 students and 70 teachers, it said.

The Kashmir issue and other regional issues have kept India and Pakistan on the edge of war for decades, but in recent years things have taken a turn for the worse.

Read more: Trump's rejection of 'socialism' makes America weak in the fight for 5G against China's Huawei

Today, both Pakistan and India have grown in nationalist fervor, with online militias on Facebook and elsewhere lusting for blood and mocking each other's militaries and nations.

India and Pakistan developed nuclear arsenals to deter each other from fighting, but small cross-border raids and violence have been common for years.

Furthermore, both Pakistan and India's nuclear-armed backers have taken sides in the conflict already.

China and US picking sides?

A surface-to-surface Agni V missile during the Republic Day parade in New Delhi, January 26, 2013. REUTERS/B Mathur

China tried to block the UN statement condemning Jaish-e-Mohammed and bizarrely downplayed the statement in its state-run media while the US national security adviser to President Donald Trump, John Bolton, defended India's right to self-defense and called for Pakistan to crack down on the group, suggesting Pakistan provided a safe haven for terrorists.

Pakistan infamously hosted Osama Bin Laden for years before a 2011 US raid took him out in Abbottabad. Iran blamed a terror attack that killed 27 members of its elite Revolutionary Guards on a Pakistan man in February.

Read more: Trump's administration reportedly looked for ways to help Saudi Arabia build a nuclear weapon

India's Modi seeks reelection this year and has built a name for himself as a strong Hindu nationalist. Christopher Clary, an international-affairs expert and professor at the Rockefeller College of Public Affairs and Policy at the University of Albany, previously told Business Insider the situation could quickly spiral out of control because of political pressure on both sides.

"We don't have that many countries with nuclear weapons that share a common border, so things can get pretty hairy," said Clary.