Six Palestinians trapped after a tunnel between the Gaza Strip and Egypt collapsed were rescued late on Friday.
Palestinians gathered to watch rescue efforts
Witnesses said they were pulled out of a shaft dug under a house connected to the tunnel, Reuters news agency said.
They were reportedly unscathed after being trapped underground for some 12 hours. It was not clear what the tunnel was being used for at the time.
In recent years, Palestinians have created a network of tunnels to smuggle in arms and contraband from Egypt.
On Sunday, a joint militant operation blew up an army post near Rafah by detonating 1.5 tons of explosives packed into a tunnel underneath, killing five soldiers.
Israel had allowed Palestinian rescue services into a closed military area in Rafah on Friday to try to retrieve the men.
The tunnel collapsed on Thursday and local residents discovered the problem when they saw a large hole on Friday.
Palestinian militants have dug many tunnels near the border area to smuggle arms and attack Israeli forces - other tunnels have been used solely for smuggling civilian goods like cigarettes.
Last month, Israeli forces rescued three Palestinians who had been trapped in a collapsed tunnel they had been digging.