Every area in San Andreas named on the map is a territory, including the state. The glitch involves activating territories that have been dummied out (by setting all gang ownership values in the territory to zero), and forcing them to be active again by making a gang own that territory.
Type 1 involves traveling out towards the sea in any direction for approximately 30 minutes. You must not stop your vehicle, turn back, or pause the game.
This version of the glitch is caused by arrays related to maps, but not related to determining which parts of the map have been revealed or "un-fogged" (marked with a normal color instead of grayed out and having markers shown in it on the main menu map), being unintentionally modified by the game when attempting to reveal parts of the map while outside of the main San Andreas area as the player moves to these areas.  
Depending on which part of memory the game corrupts attempting to reveal newly accessed parts of the map, various parts of the game may be affected, most obviously the gang territories, but will also affect other elements depending on the game version. 
Several of the following glitches can occur due to the array corruption:
- More Taxis.
- More drug dealers.
- Black Traffic Cheat activates.
- If the player still had any unexplored grayed out areas on the map, they will suddenly appear explored.
- More gang turf.
- No taxi fares can be found during the Taxi Driver mission. (PC and Xbox version)
- The scouting sequence of the Mike Toreno mission breaks, making the player unable advance the mission by going to the mission marker. If this occurs they must skip to the airport directly to finish the mission.
Up to 173 territories can be affected by Type 1 of this glitch in the original PS2 version, and only 12 can be affected in other versions.
This glitch will occur during normal completion of the game, as some required missions require the player to access areas outside of the normal San Andreas zone, such as Saint Mark's Bistro and Freefall.
This glitch does not work for the PlayStation 2 Greatest Hits version, the Xbox Platinum Hits version, or the PC 1.1 version, as a sanity check to only modify the revealed map array in the correct bounds has been added in these versions. However, the Steam version is based on the original PC release, and thus doesn't have the sanity check to prevent this glitch from happening. Types 2-4 work for the versions with the sanity check though.
- Enable the Cars fly cheat or Cars on water cheat. Drive in any direction off the map. Keep driving for 30 minutes, then swim under water and allow yourself to drown. When you spawn at the hospital, the map will be covered in territories, if it worked.
- Drive your boat off the map for 30 minutes, then die. When you spawn back at the hospital the glitch should work.
- Not a recommended way, but you can do it by swimming, swim for 30 minutes (or more time) then go underwater and drown, or just use the suicide cheat. (Worst way)
- As well you can use the jetpack if you want to, it should take 30 minutes (or more) to do this, then just go underwater and drown, or use the suicide cheat.
- Fly an airplane or helicopter away from map for 30 minutes then jump out and drown (Suicide cheat, or just causing an explosion works as well). When you spawn outside of the hospital, the map should be covered with your territories. The best and recommended way to do this, is using a trick that works best with the Shamal airplane. Get a Shamal and fly away from the map. Climb to maximum possible height, then release the keys. If done correctly, the plane will go up and down moving forward by itself. This functions as an autopilot that can let the plane fly for a long time without the player having to pay any attention to the game. This way of flying is realistic and is called the Phugoid motion.
- The player can use this glitch if there are still enemy gang territories. When your turf is under attack, kill all of the attacker on the territory you want to give to GSF. A convenient way to do it is planting satchel charges on the attackers and then go to the desired place, but it can also be done by luring them to the desired area and killing them there. If the explosion doesn't go off, then go somewhere where it's in range. You can make it stronger by doing it a couple of times (each time this glitch is used, 10 GSF density is added to the territory). If this cheat is used more than once in the same territory, it may get attacked by Ballas/Vagos if they own a territory nearby.
- You can make other gangs attack your hood. For example, it is possible for the Varrios Los Aztecas to attack Grove Street territory. First, you'll have to wait for some Ballas to attack your hood. When your territory is attacked, lure 3 Ballas gangsters into El Corona or Little Mexico, which is VLA turf, and kill them there. Then drive to the attacked hood. You will see blue points on the map, either Glendales, Broadways or Hermes blocking the turf and Varrio's attacking it.
- You can also give control of territories to Ballas/Vagos. When a territory gets attacked, kill 3 attackers on the desired territory and then wait for the attack to time out, or cancel it with a R3 mission (taxi, paramedic, vigilante, etc...). The territory should gain Ballas/Vagos density equal to the number of attackers left alive 3 times. Territories that you put Ballas/Vagos may attack others, and might get attacked if taken over.
- A way to add Ballas/Vagos density even more is waiting for an attack but not trigger it, then attack random Ballas/Vagos in the desired territory and wait for the attack to time out, until you get the message that you left the attack unchecked. The territory will gain + 30 Ballas/Vagos density.
- For type 4 to work, type 2 has to have been used previously, because type 4 only works in already activated territories.
- Apparently, the entire State of San Andreas was originally going to be covered in gang territories in the beta.
- If you take a territory by a gang war it will not be affected by the territories (for an example: taken a Los Santos Vagos hood at any place).
- It's very hard if you want take the San Fierro Bay gang territory because it's part of the sea. The only way to do that is by using the Minigun, Sniper Rifle, or Satchel Charges.
- If you created territory in Red County, Flint County, Tierra Robada and Bone County, members of the gangs won't spawn. This is because the countryside is set to have no gangs in the "popcycle.dat".
- If this glitch is working, Biker Crack Dealers will start spawning in San Fierro.
- On a very rare occasion, some effects of this glitch may already occur during the mission Saint Mark's Bistro. This may happen since you have to fly about 3 minutes away from the map for this mission. Overall, the effects are very rare and very minimal due to the limited distance you cross and not worth being worried about.
- The type 1 glitch seems to be working best on the PlayStation 2.
- In the PlayStation 2 version, any territories spawned by the glitch, will only have the first round of 'weaker' enemies (Pistols and Baseball Bats) compared to the three rounds of territories in Los Santos.
- In the PS2 version, while doing the type 1 glitch sometimes you will get a 1 star wanted level for no apparent reason.
- Gangs like the Aztecas, Rifa or the Triads can also spawn thanks to the Territory Glitch. This is more easily seen on the PS2 version.
- In the original PS2 version, after completing Saint Mark's Bistro, Bayside Marina will be usually under control of the Vagos.