OUAGADOUGOU, BURKINA FASO -- Two Spanish journalists and the Irish director of a wildlife foundation were killed Monday in an ambush in eastern Burkina Faso, the Spanish government and officials in the African country said Tuesday.

The two journalists were working with the wildlife campaigner on a documentary about poachers in a national park bordering Benin when they were attacked by gunmen, Spain's Foreign Minister Arancha Gonzalez Laya said Tuesday in a press conference in Madrid.

The Spanish journalists were David Beriain, 44, and Roberto Fraile, 47, both from northern Spain, said members of the Reporters Without Borders organization representing the two reporters' families.

Beriain was conducting early research for a documentary project on how Burkina Faso's authorities are tackling poaching, also focusing on the communities of people living in the park, according to media content producer Movistar Plus.

The company identified the Irish victim as Rory Young, director of the Chengeta Wildlife Foundation.

At the time of the attack, the three men were travelling with an anti-poaching patrol with about 40 people, said Gonzalez Laya.

"It is a dangerous area where terrorists, bandits, and jihadists usually operate," the minister said.

The Irish government said it was "aware of the reports and is liaising closely with international partners regarding the situation on the ground."

An audio message heard by The Associated Press that purports to be from the jihadist group known as JNIM that is linked to al Qaeda claimed responsibility for the attack. "We killed three white people. We also got two vehicles with guns, and 12 motorcycles," said the recording.

Burkina Faso's special military wildlife unit was ambushed Monday morning while travelling with the foreigners, 15 kilometres (9 miles) from their base at the eastern town of Natiaboni, Yendifimba Jean-Claude Louari, the mayor of Fada N'gourma, the main town in the east, told AP.

"This attack is of significant importance because it shows (the jihadists) capacity to mount a strategic and deadly attack against a significant convoy heavily protected by Burkinabe security forces and rangers," said Flore Berger a researcher in the Sahel, the vast area south of the Sahara Desert that stretches across West and Central Africa.

Two soldiers wounded in the attack and evacuated to a military hospital in the capital, Ouagadougou, told AP they were attacked by jihadists who outnumbered their patrol. One soldier was shot in the leg and the other in his arm, causing it to be amputated. They insisted on anonymity because they were not authorized to speak to the press. When the jihadists attacked, the soldiers tried to form a protective shield around the foreigners, but once the shooting stopped they realized they had disappeared, he said.

"We were discouraged. It's like you leave your house with 10 people, you go to work and then you come back with eight people. What do you say to those two people's families?" said one of the soldiers.

After a life devoted to producing hard-hitting journalistic reports on armed conflicts, violent groups, and traffickers that took Berian around the world, the seasoned journalist and his wife were running a Madrid-based production house responsible for visually harrowing informative programs for some of Spain's major video platforms.

Fraile, the father of two children, had covered several conflicts as a freelance cameraman, including the decade-long war in Syria. In 2012, he survived an attack in the Syrian city of Aleppo in which he was wounded by shrapnel in the pelvis.

Spanish Prime Minister Pedro Sanchez sent condolences to the reporters' relatives and friends in a tweet: "Our appreciation to those who, like them, carry out courageous and essential journalism from conflict zones on a daily basis," he wrote.

The foreigners had been travelling with the rangers for approximately one week, said the soldiers. The rangers were conducting their first mission in Arly National Park after finishing a six-month anti-poaching training program, he said.

Burkina Faso has been attacked by jihadist attacks linked to al Qaeda and the Islamic State that have killed thousands and displaced more than 1 million people. The east is one of the hardest-hit parts of the country, and while it's unclear which group operates where the attack occurred, conflict analysts say the area is known to be under jihadist control and that the groups engage in kidnappings as a way to fund their operations.

"Foreign nationals are a preferable target to be used as bargaining chips in exchange for ransom," said Heni Nsaibia, an analyst with the Armed Conflict Location and Event Data Project.

Since the early 2000s militant groups have developed a kidnapping industry in the Sahel, five foreign hostages are still missing, including two taken from Burkina Faso, he said.

Alfonso Armada, president of Reporters Without Borders in Spain, said it was "regretable" that the reporters "lost their lives working in the field, muddying their shoes pursuing true journalism."

"The image of journalists around the world is deteriorating. Many consider us enemies of the people and good information is needed more than ever in all countries," Armada said.

------

Parra reported from Madrid.