The two slain Palestinians were later identified by medics as Abdel Hafez As-Silawi, 21, and Muhammad Nasir, also in his 20s.
According to Dr Mu'awiyah Hassanein, the head of emergency and ambulance services in Gaza's Health Ministry, As-Silawi's body arrived at Kamal Adwan Hospital along with another three wounded, one critically.
Hamas' militant wing, the Al-Qassam Brigades, said in a statement that Israeli forces operating in northern Gaza had opened fire with tank shells, which an Israeli spokeswoman later confirmed in a telephone call.
Other witnesses reported seeing seven artillery shells landing in or around Izbet Aved Rabbo, a town east of Jabaliya refugee camp, which two armed Palestinian groups cited as the apparent target.
The military spokeswoman said the attack came after soldiers, who were on what she called a routine patrol, witnessed Palestinians attempting to detonate an explosive along the border near the Nahal Oz crossing.
She also claimed the two individual Palestinians were responsible for firing three mortar rounds into southern Israel on 24 August. One of the rounds injured an Israeli soldier, she said.
Ma'an could not independently confirm conflicting reports from Palestinian and Israeli sources regarding the men's allegiances, but both were thought to be fighters affiliated with the armed wings of separate factions.
In its statement, Hamas said As-Silawi belonged to its militant wing, while the Israeli spokeswoman said the Palestinian was a member of the Popular Resistance Committees.
Both Israel and the Popular Front for the Liberation of Palestine agreed that Nasir was affiliated to the leftist movement, while the PFLP's statement added that he was a member of its Abu Ali Mustafa Brigades.
Also on Sunday, Palestinian fighters fired two homemade projectiles from the Gaza Strip into Israel, according to Israeli reports. The projectiles reportedly landed in an uninhabited area near the border town of Sderot, causing no damage or injuries.
A group calling itself "Sunnah members" later claimed responsibility for launching the attacks. In a statement, it said the launches were in response to recent reports that Israeli prison guards had sexually abused female Palestinian prisoners.