The new Spanish Prime Minister Pedro Sanchez greeted the German chancellor and her husband in the southern city of San Lucar de Barrameda on Saturday afternoon.
They held a working lunch with discussions about migration and refugees and afterwards gave a short press conference.
Merkel said "It is good to know that the German and Spanish governments have the same approach: as Europeans, we are only strong when we work together to resolve the issues of the future."
Last Monday, Spain became the first EU country to sign an agreement with Germany for the return of asylum seekers if they had lodged an asylum claim in another EU state. Merkel thanked Spain for the agreement which, she said, would bring better order to migration.
The chancellor also said Germany wanted "close, real cooperation with African countries from which both sides an win." She added "We must not talk about, but with Africa."
The two-day visit is expected to include discussions on economic and monetary reform in the EU, the recent NATO summit and European defense.
A German government spokesman on Saturday said the two leaders were also expected to visit the nearby Donana national park.
Each evening at 1830 UTC, DW's editors send out a selection of the day's hard news and quality feature journalism. You can sign up to receive it directly here.