The violence is the latest flareup along the heavily armed frontier.
Six people were killed and 46 were wounded on the Pakistani side, its military said in a statement.
Three people were killed and eight were wounded on the Indian side, said Pawan Kotwal, a military official.
Both sides accused each other of starting the gunfire and shelling across the border.
Pakistan said villages were hit near the city of Sialkot in Punjab province. India said the Pakistani fire struck areas of the state of Jammu and Kashmir.
Neither side reported any casualties among military personnel.
Recent breaches of border truce
Since their independence from British colonial rule in 1947, India and Pakistan have fought three wars, two of them over the disputed Himalayan region of Kashmir.
The two nuclear-armed neighbors had agreed to a bilateral ceasefire in border regions in November 2003, and the agreement held for roughly a decade.
But there has been a series of breaches in recent years.
Indian-controlled Kashmir has been the site of violence between separatists and security forces since 1989, a conflict that has claimed more than 43,000 lives.
Security talks canceled
The Kashmir issue led to the cancellation of planned security talks
between the two nations earlier this week.
Pakistan's national security adviser Sartaj Aziz was scheduled to visit New Delhi on Sunday for two-day talks with his Indian counterpart Ajit Doval.
India objected to Aziz's planned meeting with Indian Kashmiri separatist leaders on the margins of the official negotiations. Both sides also squabbled over whether the talks should cover the Kashmir dispute.
But the spat didn't end all efforts at dialogue.
Pakistan announced Wednesday that the two countries' border security force chiefs plan to meet in New Delhi next month.