A method for producing purified hydrogen and electrical power in a combined hydrogen and electricity supply system whereby the ratio between purified hydrogen and electrical power can be adjusted, the method comprising the steps of: - introducing a carbonaceous fuel and steam into a pre-reformer, and in the pre-reformer reforming part of the carbonaceous fuel by steam reforming into a first reformate gas comprising hydrogen and carbon monoxide so that unconverted carbonaceous fuel remains; - introducing the unconverted carbonaceous fuel and the first reformate gas into an anode side of a solid oxide fuel cell stack; - in the solid oxide fuel cell stack reforming at least part of the unconverted carbonaceous fuel by internal steam reforming into a second reformate gas comprising mainly hydrogen and carbon monoxide, - introducing an oxygen containing gas into a cathode side of the solid oxide fuel cell stack, - in the solid oxide fuel cell stack converting oxygen of the oxygen containing gas as well as hydrogen and carbon monoxide of the first and second reformate gas (S1, S2) into electrical power and an anode off-gas; - introducing the anode off-gas into a hydrogen separation unit, and - converting in the hydrogen separation unit the anode off-gas into purified hydrogen and an off-gas, whereby the reforming in the pre-reformer is performed as external reforming, characterized in that the pre-reformer being thermally separated from the solid oxide fuel cell stack to allow independent thermal control of the pre-reformer and the solid oxide fuel cell stack to separately control external reforming and internal reforming, that a controllable heating source is thermally coupled to the pre-reformer to provide the pre-reformer with controlled heat to control the reforming rate of the pre-reformer, that the electrical power production is controlled to provide heat for internal reforming and to control internal reforming, and that the amount of purified hydrogen as well as the amount of electrical power produced is modulated by a combined control of external reforming, internal reforming and a fuel utilization rate of the solid oxide fuel cell stack. - introducing a carbonaceous fuel and steam into a pre-reformer, and in the pre-reformer reforming part of the carbonaceous fuel by steam reforming into a first reformate gas comprising hydrogen and carbon monoxide so that unconverted carbonaceous fuel remains; - introducing the unconverted carbonaceous fuel and the first reformate gas into an anode side of a solid oxide fuel cell stack; - in the solid oxide fuel cell stack reforming at least part of the unconverted carbonaceous fuel by internal steam reforming into a second reformate gas comprising mainly hydrogen and carbon monoxide, - introducing an oxygen containing gas into a cathode side of the solid oxide fuel cell stack, - in the solid oxide fuel cell stack converting oxygen of the oxygen containing gas as well as hydrogen and carbon monoxide of the first and second reformate gas (S1, S2) into electrical power and an anode off-gas; - introducing the anode off-gas into a hydrogen separation unit, and - converting in the hydrogen separation unit the anode off-gas into purified hydrogen and an off-gas, whereby the reforming in the pre-reformer is performed as external reforming, characterized in that the pre-reformer being thermally separated from the solid oxide fuel cell stack to allow independent thermal control of the pre-reformer and the solid oxide fuel cell stack to separately control external reforming and internal reforming, that a controllable heating source is thermally coupled to the pre-reformer to provide the pre-reformer with controlled heat to control the reforming rate of the pre-reformer, that the electrical power production is controlled to provide heat for internal reforming and to control internal reforming, and that the amount of purified hydrogen as well as the amount of electrical power produced is modulated by a combined control of external reforming, internal reforming and a fuel utilization rate of the solid oxide fuel cell stack.