A referendum is set to take place on 1 October, however Mr Rajoy’s government has said the measure is unconstitutional and declared it illegal.
Mr Rajoy said he thought it would be “wrong” for Catalonia to vote to gain independence. He also pointed to logistics issues that could prevent holding the referendum vote like a lack of staffed polling stations, a team coordinating the vote, and having no official ballots ready.
He said he hoped the region would “go back to common sense ... put an end to this whole story”.
Mr Trump, who referred to Mr Rajoy incorrectly as “president” twice during a joint press conference, said he “think[s] Spain is a great country and it should be united”.
Echoing his criticism of American polling data on him during the 2016 election, Mr Trump said of the Catalonian people: “If you have accurate numbers and polling, you would see they love Spain”.
“It would be foolish not to,” said Mr Trump.
The President’s comments come at a time when his thoughts on the National Football League (NFL) and its players kneeling during the national anthem ahead of games as a sign of protest against degrading race relations in the country were labelled as “divisive” by the league and star basketball player LeBron James.
Mr Trump was speaking at a rally last week when he said: “Wouldn’t you love to see one of these NFL owners, when somebody disrespects our flag, to say, ‘Get that son of a bitch off the field right now! Out! He’s fired. He’s fired!’”
He was referring to Colin Kaepernick, a former San Francisco 49ers player, who began the kneeling protest nearly 18 months ago after a slew of police-related shooting deaths of young black men in the US.
Mr Trump tweeted over 13 times during the weekend about the NFL and the NBA Champion Golden State Warriors being uninvited from a customary White House visit.
Mr Trump said during the joint news conference that he was “not preoccupied with the NFL” but “ashamed” at the players’ actions.
He reiterated it was disrespectful of the “the flag, our national anthem”, and the country.
Mr Trump also brought up a trip to the military hospital Walter Reed, saying that he visited with “badly injured” soldiers – creating what is seemingly a false equivalency between the players’ protests against race-based killing in the US with disrespecting veterans and the US military.
Having also faced criticism for his response to the damage suffered by Puerto Rico thanks to Hurricane Maria, Mr Trump repeatedly said that Puerto Rico Governor Ricardo Rossello praised the federal government’s efforts and how he was “so thankful for the job we’re doing”.
“We’re getting great reviews,” said the President of relief efforts.
Mr Trump did not offer an explanation for his delayed public comments about the island with 3.5 million US citizens – having gone a number of days without mentioning the crisis, but said the US is “Unloading massive loads of water, food, supplies ... literally on an hourly basis.”
“We’re going to do far more than anyone else could do,” Mr Trump said.
During his press conference with Mr Rajoy, Mr Trump urged the European Union to join in sanctioning the government of Venezuelan President Nicolas Maduro.
“We hope our friends in the EU will soon follow the United States, Canada and many Latin American nations in sanctioning the Maduro regime. We need everybody involved,” Mr Trump said.
“The citizens of Venezuela have endured immense suffering, poverty, starvation, and dangerous political unrest under Maduro's oppressive socialist regime.”
The President and Mr Rajoy also discussed North Korea, whose nuclear programme the Prime Minister said was an “intolerable violation of international legality”.
Mr Trump blamed US administrations going back 25 years saying they all “left me with a mess ... But I’ll fix that mess”.
He praised Spain for the expulsion of the North Korean ambassador as well as the UN Security Council’s unanimous vote on the strictest-ever sanctions on the isolated Asian nation.