MANILA — Taiwan and mainland China reacted with anger Friday over the death of a Taiwanese fisherman who was fatally shot when the Philippine Coast Guard opened fire on his boat, saying it had tried to ram a Philippine ship.

President Ma Ying-jeou of Taiwan said Friday, “We demand the Philippines investigate and clarify the truth, to apologize, apprehend the killer and compensate.”

The shooting occurred at 10:30 a.m. Thursday in an area between the northern tip of the Philippines and the southern coast of Taiwan, according to a Philippine Coast Guard statement. A maritime control and surveillance vessel operated by the Philippine fisheries bureau, and staffed by coast guard officers, encountered four Taiwanese fishing boats in an area that the Philippines claims as part of its exclusive economic zone, according to the statement.

When the coast guard officers tried to board and inspect one fishing boat, another tried to ram the Philippine vessel, according to the coast guard statement. The Philippine ship responded by firing warning shots, and then firing on the engine and propeller of the fishing boat to disable it, according to the statement.