I would like to know what the above expression means literally in this phrase:

"The shift in Qatar’s energy portfolio toward natural gas has allowed the tiny country to move to a commodity on which Saudi Arabia has a less dominating influence and that fits with Qatar’s desire to obtain greater independence from Saudi Arabia and attain economic and security relationships

and also "fits with" in which i got quite confused. I would be pleased being helped to understand that "that" refers to which concept?

Thank you in advance