Pakistan accused India of unprovoked firing in which four civilians died and five others were injured.
India said one woman was killed and three other civilians wounded in firing by Pakistani soldiers.
Pakistan's army also said it shot down an Indian spy drone in Kashmir.
Pakistan summoned the Indian ambassador on Thursday to hear a "strong protest over airspace violation", the AFP news agency quoting a statement issued by the Pakistani foreign ministry said.
The incidents come days after Mr Modi accepted an invitation from Mr Sharif to attend a regional summit in Islamabad next year, signalling a new thaw in a strained relationship. This will be Mr Modi's first visit to Pakistan after he took power last year.
India and Pakistan have often accused each other of unprovoked firing along the disputed border. A ceasefire agreed in 2003 remains in place, but the neighbours often accuse each other of violating it.
Pakistan's military said four civilians, including a 18-year-old girl, had died and five others were wounded when Indian troops fired across the de facto border in Sialkot region on Wednesday morning.
Across the border, Indian border guards said one woman had been killed and three other civilians injured when Pakistani soldiers fired shells which exploded near a border village in Pargwal area on Wednesday.
"It was a blatant, unprovoked cease-fire violation by Pakistan," D Parekh of India's Border Security Force told the Associated Press news agency.
Meanwhile, India's army and air force have denied that any of their drones had been shot down or crashed in Pakistan, reports said.
"An Indian spy drone was shot down by Pakistani troops which intruded into Pakistan along [the de facto border that divides the region] near Bhimber today. The spy drone is used for aerial photography," a statement from the Pakistani military said on Wednesday.
But a spokesperson of the Indian army denied the report.
"Some reports of a drone crash in PoK [Pakistan-controlled Kashmir] are being referred to. No drone or UAV [unmanned aerial vehicle] crash of the Indian Army has taken place," the spokesperson told the Press Trust of India news agency.
An air force spokesperson also denied that any of their drones had been brought down.
Kashmir, claimed by both countries in its entirety, has been a flashpoint for more than 60 years.

It is a pretty astonishing story of rebirth.
Ten years ago al-Qaeda was on the run.
It had lost training camps, money and men - crushed by American and Pakistani operations.
And then, to make matters worse, its local franchise in Iraq went off the rails, becoming so barbaric that al-Qaeda's own supporters turned against it.
So how did al-Qaeda turn things around? In a word: strategy.
It learnt from its mistakes and went on a charm offensive - delivering gas and water to people, taking over bakeries and selling cut-price bread.
And it seems to be working.
Al-Qaeda and its affiliates are known to operate in Syria and Iraq, in Afghanistan and in Yemen, and in several African countries including Mali, Somalia and Niger.
While IS is losing support all over the Middle East, al-Qaeda's star is rising.
In fact, it is now so popular that, in the long run, al-Qaeda may pose the greater threat.
You can listen to The Inquiry: What happened to al-Qaeda? on the BBC World Service website or download the programme podcast.
At least five civilians were killed as India and Pakistan exchanged fire in the disputed Kashmir region, days after a meeting between leaders of the two countries in Russia.
[NEXT_CONCEPT]
Barely out of the headlines a few years ago, al-Qaeda may now appear to have been eclipsed by so-called Islamic State - but, according to four of the world's leading experts on the organisation founded by Osama Bin Laden, it is more dangerous than ever, as The Inquiry team explains.