ISTANBUL — Turkey signaled support for Qatar on Wednesday after the tiny Gulf country was isolated by several of its neighbors in a major rift among Arab nations.

Meeting in a special night session of Parliament, Turkish lawmakers rushed through new laws that will allow the Turkish Army to conduct joint military exercises with Qatar and members of the Turkish gendarmerie to train their Qatari counterparts.

The new legislation also allows Turkey to send more troops to Qatar, where it has an army base and about 150 soldiers.

The moves followed a speech by President Recep Tayyip Erdogan of Turkey in which he criticized the countries that acted against Qatar, including Saudi Arabia, the United Arab Emirates, Bahrain, Egypt and Yemen.