After a terrorist attack in Indian territory in Kashmir on Feb. 14 killed 40 security personnel, the India Air Force carried out an airstrike in Pakistan on Feb. 26. They claimed to be targeting the perpetrators, although there were no casualties, according to Pakistan.
In response, Pakistan carried out limited airstrikes of their own on Indian territory a day later. Aerial fighting took place that saw Pakistan shoot down two Indian jets and arrest one of the pilots, whose plane crashed on the Pakistan side of the border.
As the world turns its gaze to the mountainous region on the border between Indian and Pakistan, ABC News spoke to experts and analysts to find out the origins of the conflict and how close the countries actually are to another war.
OriginsIndia and Pakistan have gone to war three times over the disputed region of Kashmir, most recently in 1999. The origins of conflict lie in the way both countries gained independence from British rule in 1947.
"Pakistan was founded as a homeland for Muslims, making it the world's first religious nation-state a year before the 1948 establishment of Israel," Dr Elizabeth Chatterjee, a lecturer in regional and comparative politics at Queen Mary University in London, told ABC News. "Its founders fully expected that Muslim-majority Kashmir would join it. But when armed tribesmen poured over the border, Kashmir's Hindu ruler hurriedly agreed to join Indian instead."
Under secular Indian rule, Kashmir became a crucial symbol of unity for India's first prime minister, Jawaharlal Nehru.
"He feared that giving back Kashmir would open up the brutal religious wounds of 1947, when the partition of India and Pakistan left more than a million dead," Chatterjee said.
Besides that geopolitical conflict, another crucial factor is behind the tension: water.
"Nationalism plays a big role, but there is also a resource angle," historian Daniel Haines, author of "Rivers Divided: Indus Basin Waters in the Making of India and Pakistan," told ABC News. "Kashmir and India are upstream of Pakistan on all the major rivers that Pakistani people depend on for water. During my research on the topic, I found that Pakistani leaders have often seen India's control of Kashmir as a major threat."
Militant groups and nuclear powersKashmir is now divided between Indian and Pakistani administered territories. The crucial border between them is known as the "Line of Control."
This week's crisis was sparked by a suicide bombing in the Indian-held Kashmir territory of Pulwama, which killed 40 security personnel on 14 February.
The Indian government blames the attack on Jaish-e Mohammad (JeM), a militant group trying to end Indian rule in Kashmir, according to a 2004 report prepared for the United States Congress by think tank CRS. The Indian Foreign Minister has said that Pakistan harbors the organization, which has carried out a number of attacks on Indian territory -- though Pakistan denies this.
The exact relationship between the Pakistani government and this organization has been unclear, according to security expert Alexander Sehmer, director of geopolitical intelligence at analytics company Falanx Assynt.
"The Pakistani government outlawed JeM in 2002 under international pressure, but it's pretty much accepted that elements of Pakistan's security forces and the [Pakistan Intelligence Agency] ISI have links to militants in the group," he told ABC News. "Having said that, there isn't any evidence that Pakistan was involved in the Pulwama attack, although India did claim it could demonstrate that it was."
Militant groups have long been used by the Pakistani military, according to Chatterjee.
"Sponsoring militants in Kashmir has offered Pakistan's army a golden strategic opportunity since the 1980s," she said. "The insurgency keeps a substantial chunk of India's much larger military tied up on the border ... while allowing Pakistan to deny any responsibility."
Militants may be "sponsored" by Pakistan, but Chatterjee argues that Kashmiri people have grown increasingly frustrated with Indian rule. "It is easy to forget the actual people at the heart of this conflict as the two countries beat their war drums," she added.
Now, the stakes are higher than ever.
"Both India and Pakistan have been open about their nuclear capabilities since the 1990s," Amil Khan, associate fellow at Chatham House, told ABC News. "For the past quarter of a century or so, any conflict between them has been a troubling prospect."
The risk of 'unintended consequences'This week's crisis was the first time the Indian Air Force had entered Pakistani territory since the war of 1971. Security expert Sehmer believes the recent "dogfight" over Kashmir that saw two Indian jets shot down by Pakistan on Wednesday represents the "most substantial military confrontation" between the two since then.
A key factor in how the crisis will unfold will be the roles played by the countries' respective leaders, Indian Prime Minister Narendra Modi and the recently elected Pakistani Prime Minister Imran Khan.
"Modi is a leader of a populist, right-wing party that is facing an upcoming election," Amil Khan said. "For a right-wing populist facing an election, there are few more welcome sounds than a bit of saber rattling with a traditional foe."
Khan told ABC News the military plays a far bigger role when it comes to national security in Pakistan, and they have an effective "monopoly" when it comes to immediate threats from India.
"The risk of serious conflict is entirely dependent on unintended consequences -- mutual brinkmanship that gets out of control," he added.
Although the situation remains tense, the immediate crisis looks set to cool somewhat on Thursday after Prime Minister Khan agreed to release the Indian pilot in Pakistani custody as a "peace gesture," according to the Associated Press.
The hashtag #SayNoToWar has been trending on social media, and President Donald Trump told reporters in Hanoi the U.S. has "been in the middle trying to help [India and Pakistan] both out."
However, the long-term reasons behind the conflict are likely to remain unresolved, and the events of the past few weeks serve as are a stark reminder of just how quickly the Kashmir conflict can escalate.
This piece has been updated to correct the date of the last war between India and Pakistan over Kashmir.