Obama is said to have given the assurance to Rajoy that the visit would go ahead during a conversation that took place before Nato summer in Warsaw being attended by both leaders.
“Barack Obama told Mariano Rajoy he would be delighted to greet him in his own city,” Spanish government sources told Spanish news agency Europa Press.
Members of the US delegation also confirmed to Europa Press they had heard nothing about a change of plans.
Earlier in the day some Spanish media commentators suggested Obama's visit to Spain would be called off in the wake of an attack on police officers in Dallas.
Five police officers were killed and six were injured during a protest in that city against the police killings of two black men in Louisiana and Minnesota. Rajoy sent a message of support to the United States on Twitter after the “terrible attack”.
Obama is set to arrive in Seville on Saturday before a whistle-stop tour of the southern city and a visit to the US naval station in Rota.
On Monday, the outgoing US president will meet with Rajoy, and the King will host a royal palace lunch for Obama, along with leaders from Spain’s major political parties
Obama will be the first US president to visit Spain in 15 years.