In this research an algorithm based on Monte Carlo simulation is introduced to assess the risk of fire following earthquake in residential, industrial, educational, and governmental land- uses in district No. 20 of Tehran. The proposed algorithm consist of different modules including hazard analysis, vulnerability assessment, leak and break analysis of damaged pipeline, ignition probability analysis of the damaged pipeline, gas flow analysis of pipeline, ignition and consequence analysis. Based on the results of this research in the extreme state, four leaks, one break, and two ignitions were estimated. In addition, the total affected area of the four mentioned occupancies includes 25233 square meters and the total affected population of 146 people was acquired. By applying proposed mitigation measure, the mentioned results in the case of leak could be reduced by 75%, in the case of break reduced by 100%, and in the case of ignition it was reduced by 100%.