DOHA, Qatar — For signs of how Qatar has adapted to the blockade imposed by its neighbors, you need to go no further than the Al Meera grocery in a strip mall across from a mosque, in a residential part of the capital. Shelves where local products were once rare now hold Qatari milk, Qatari tissues and Qatari cucumbers.

“This is Qatari. This is Qatari. This is all Qatari,” a supervisor said, pointing out Qatari-made laundry detergent, dish soap and disinfectant.

Producing such products at home may be business as usual for many countries, but for Qatar it was one of many defensive shifts made to survive a political and economic assault by its neighbors.

Eighteen months after Saudi Arabia, the United Arab Emirates, Bahrain and Egypt imposed a land and sea blockade aimed at bringing Qatar to heel, this tiny, gas-rich strip of sand jutting into the Persian Gulf is still refusing to capitulate. In the meantime, it has adapted, retooling its economy and foreign relations in ways that could reshape the strategic layout of the Persian Gulf.