The invention is directed to a method of forming a gel, to a gel obtainable by said method, to a heat treated native potato protease inhibitor, to the use of said protease inhibitor, and to a foodstuff comprising said gel or said protease inhibitor. The method comprises the subsequent steps of: providing a solution of native potato protease inhibitor isolate having an isoelectric point of more than 6.0 and a molecular weight of less than 35 kDa; subjecting the native potato protease inhibitor solution to a heat treatment to a temperature of 65-121 °C for at least 10 minutes, or an UHT treatment at temperatures above 121 °C, at an ionic strength of less than 60 mM and a pH of less than 4.5 yielding a heat treated native potato protease inhibitor solution; and setting the ionic strength of the native potato protease inhibitor solution to more than 60 mM.