BARCELONA — Prime Minister Mariano Rajoy of Spain threatened on Monday to prolong his government’s direct rule over Catalonia if separatist lawmakers try to allow Carles Puigdemont to run the region from exile.

Mr. Rajoy ousted Mr. Puidgemont and his government in October for leading Catalonia’s drive to break from Spain and called new elections in hopes of a change of leadership.

The election in December did not yield the result Mr. Rajoy had hoped for, however, with separatist parties winning 47.5 percent of the vote, which was sufficient to keep their parliamentary majority.

Mr. Puidgemont now appears poised to become Catalonia’s leader once again, despite having fled to Belgium to avoid prosecution in Spain, possibly for sedition and rebellion.