Opposition lawmakers in Venezuela are trying to pry the military's loyalty away from President Nicolas Maduro, offering protection to members of the armed forces who support a transitional government.

Congress passed a declaration Tuesday declaring Maduro's rulings invalid and giving amnesty to members of the military who help return Venezuela to democratic rule.

Maduro has cultivated a stronghold within the military even as Venezuela collapses in a historic economic and political crisis.

Venezuela's President Nicolas Maduro waves as he arrives with first lady Cilia Flores and Constitutional Assembly President Diosdado Cabello to the National Assembly where he will give his annual address to the nation, before members of the Constitutional Assembly in Caracas, Venezuela, Monday, Jan. 14, 2019. (AP PhotoAriana Cubillos)

Venezuela's President Nicolas Maduro waves as he arrives with first lady Cilia Flores and Constitutional Assembly President Diosdado Cabello to the National Assembly where he will give his annual address to the nation, before members of the Constitutional Assembly in Caracas, Venezuela, Monday, Jan. 14, 2019. (AP PhotoAriana Cubillos)

Venezuela analyst Diego Moya-Ocampos says the opposition is offering the armed forces incentives to break away rather than continue supporting Maduro.

Maduro was sworn this month in to a second term following elections critics reject as a sham.

The pro-Maduro Supreme Court earlier had ruled that acts of the opposition-dominated congress are invalid.

Leaders of the opposition-controlled National Assembly, President Juan Guaido, center, First Vice President Edgar Zambrano, left, and second Vice President Stalin Gonzalez hold a session with lawmakers at the National Assembly to debate actions against Venezuelan President Nicolas Maduro, in Caracas, Venezuela, Tuesday, Jan. 15, 2019. The president is under heightened pressure from opposition politicians and foreign leaders urging him to step down. (AP PhotoFernando Llano)

Leaders of the opposition-controlled National Assembly, President Juan Guaido, center, First Vice President Edgar Zambrano, left, and second Vice President Stalin Gonzalez hold a session with lawmakers at the National Assembly to debate actions against Venezuelan President Nicolas Maduro, in Caracas, Venezuela, Tuesday, Jan. 15, 2019. The president is under heightened pressure from opposition politicians and foreign leaders urging him to step down. (AP PhotoFernando Llano)