President Muhammadu Buhari has publicly told visiting German Chancellor, Angela Merkel, his government does not support Nigerians trying to illegally enter Europe, saying those caught would be "at his or her own risk".
The president said "Any Nigerian found in Libya or anywhere on his way to Europe through illegal means will be brought home and we will send him back to the local government."
German Chancellor Angela Merkel on Friday morning arrived Nigeria and was received by Mr Buhari at the presidential villa in Abuja.
Mrs Merkel's visit to Nigeria marks the final part of her three-day trip to West Africa countries: Senegal, Ghana and Nigeria with a focus on strengthening economic development and containing illegal migration.
Her visit comes two days after the British Prime Minister, Theresa May, visited the country with plans to increase trade and investment between Nigeria and the UK.
President Buhari, who welcomed the German Chancellor at the forecourt of the presidential villa, introduced some members of his cabinet and presidential aides to his visitor before going into closed door meeting to deliberate on issues of mutual interest to both Nigeria and Germany.
After the closed door meeting, both leaders addressed the press briefly.
During the briefing, Mrs Merkel tasked Mr Buhari to ensure a free, credible and fair election in the fourth coming 2019 polls.
"I appeal that the fourth coming elections in Nigeria should be free, fair and credible. It should not result to chaos or complete breakdown of law and order. A credible election is an important aspect of democracy and good governance," she said.
The German leader said she was aware that Nigeria is facing many security challenges.
"We are aware of it and that is why we are co-hosting the great Chad conference with Nigeria to address these issues," she said.
Mrs Merkel said there are plans to increase the number of Nigerians studying in Germany. "About 1200 Nigerian students are studying in my country, we are making plans to increase that number."
She touched on boosting Nigeria's power generation capacity.
"There is one project that hasn't been finished yet, it is about the sugar plant, where we are trying to be able to switch energy production from electric supplies to bio-waste. We could open up new sources, we have entrepreneurs in our delegations that can make offers in the field of wind energy. What is important for us is that we have efficient in transmission systems.
"There is one company that I told the president about and we are happy that we are able to examine the context that identifies leakages in the pipelines.
"We are operating in a great number of areas with the Nigerian side especially with the field of energy. Germany is more than happy and even more than ready to work with Nigeria in this regard."
On business and economy the chancellor said she would be focusing on boosting small businesses in the three African countries she visited.
In his speech, Mr Buhari laid more emphasis on illegal migration. He said his administration is strongly against it.
"I guess many of my country men and women illegally struggle to find their way to European countries through the deserts and the Mediterranean because they feel there are greener pastures there whether they are prepared for it or not. As an administration, we are not in support of it.
"About three weeks ago, we repatriated 3,000 Nigerians from Libya. They want to travel to Europe illegally. We do not support this and anybody caught is at his or her own risk.
"Any Nigerian found in Libya or anywhere on his way to Europe through illegal means will be brought home and we will send him back to the local government."
Migrant arrivals in Europe across the Mediterranean from Africa and Turkey are at their lowest level in five years, but the issue remains sensitive.
Mrs Merkel, who refused to close Germany's borders at the height of the migrant crisis in 2015, has toughened her stance recently to salvage her government from a rift over the issue.
No fewer than 10,000 Nigerians have died between January and May 2017 while trying to illegally migrate through the Mediterranean Sea and the deserts, the Nigeria Immigration Service said last year.
Some in Europe hope that investing more in West Africa will help keep people in a region plagued with unemployment, dodgy infrastructure, rising extremism and now the effects of climate change from leaving.