Tensions between India and Pakistan have escalated sharply after a suicide bombing in the disputed region of Kashmir killed 40 Indian paramilitary police, an attack claimed by Pakistan-based militant group Jaish-e-Mohammad.
Prime Minister Narendra Modi has vowed a strong response to the attack and said he had given the military a free hand. Pakistan would retaliate if attacked, his counterpart, Imran Khan, has warned.
The neighbours have twice gone to war over Kashmir since independence in 1947. Here is how their militaries stack up.
In 2018, India allocated four trillion rupees ($58 billion), or 2.1 percent of its gross domestic product (GDP), to support its 1.4 million active troops, according to the International Institute for Strategic Studies (IISS).
Last year, Pakistan spent 1.26 trillion Pakistani rupees ($11 billion), about 3.6 percent of its GDP, on its 653,800 troops. It also received $100 million in foreign military assistance in 2018.
Between 1993 and 2006, more than 20 percent of Pakistan's annual government expenditure was spent on the military, according to estimates from the Stockholm International Peace Research Institute (SIPRI).
The military accounted for 16.7 percent of government spending in 2017, it said.
By comparison, India's military spending as a percentage of its government expenditure remained under 12 percent during the same period, according to SIPRI. It was 9.1 percent in 2017.
Missiles And Nuclear Weapons
Both nations have ballistic missiles capable of delivering nuclear weapons. India has nine types of operational missiles, including the Agni-3 with a range of 3,000 km (1,864 miles) to 5,000 km (3,106 miles), according to the Center for Strategic and International Studies (CSIS) in Washington.
Pakistan's missile programme, built with Chinese assistance, includes mobile short- and medium-range weapons that can reach any part of India, CSIS said. The Shaheen 2 has the longest range, of up to 2,000 km (1,242 miles)
Pakistan has 140 to 150 nuclear warheads, compared with India's 130-140 warheads, according to SIPRI.
India has a 1.2 million-strong army, supported by more than 3,565 battle tanks, 3,100 infantry fighting vehicles, 336 armored personnel carriers and 9,719 pieces of artillery, according to IISS.
Pakistan's army is smaller, with 560,000 troops backed by 2,496 tanks, 1,605 armored personnel carriers, and 4,472 artillery guns, including 375 self-propelled howitzers.
Despite its larger army, the capability of India's "conventional forces is limited by inadequate logistics, maintenance and shortages of ammunition and spare parts", IISS said in a report this month.
With 127,200 personnel and 814 combat aircraft, India's air force is substantially larger but there are concerns about its fighter jet fleet.
India's defence plans require 42 squadrons of jets, about 750 aircraft, to defend against a two-pronged attack from China and Pakistan. With older Russian jets like the MiG-21, first used in the 1960s, retiring soon, India could have 22 squadrons by 2032, officials say.
Pakistan has 425 combat aircraft, including the Chinese-origin F-7PG and American F-16 Fighting Falcon jets. It also has seven airborne early warning and control aircraft, three more than India, IISS said.
"The (Pakistan) air force is modernizing its inventory while improving its precision-strike and ISR (intelligence, surveillance, and reconnaissance) capabilities," IISS said in its 2019 assessment.
India's navy consists of one aircraft carrier, 16 submarines, 14 destroyers, 13 frigates, 106 patrol and coastal combatant vessels, and 75 combat capable aircraft. It has 67,700 personnel, including marines and naval aviation staff.Pakistan, which has a significantly smaller coastline, has 9 frigates, 8 submarines, 17 patrol and coastal vessels, and 8 combat capable aircraft.