CARACAS, Venezuela — Juan Guaidó, the Venezuelan opposition leader, returned to the country on Monday and gave a speech before cheering crowds in defiance of President Nicolás Maduro, who had threatened to have him arrested if he came back.

“We shout with resolve, ‘may oppression die,’” said Mr. Guaidó before supporters gathered in Caracas, the capital. “They threatened us with jail, with death, but nothing will happen through persecution.”

For days, it had been unclear whether Mr. Guaidó would be able to return to Venezuela after he flouted a court-imposed order not to leave the country and made a failed attempt to move truckloads of aid into the country over Mr. Maduro’s objections.

When he arrived at the Simon Bolívar Airport near Caracas on Monday, after more than a week abroad, his supporters celebrated around him, hopeful he would breathe new life into the opposition’s movement to topple Mr. Maduro.