A process for direct conversion of a hydrocarbon-containing gas, such as natural gas, biogas, synthetic natural gas or shale gas, to a higher hydrocarbons product is carried out in the anode compartment of a fuel cell reactor, in which produced hydrogen, limiting the conversion to the equilibrium, is either removed or reacted in situ with oxygen ions transferred from the cathode compartment to produce steam, thereby removing the equilibrium-limiting hydrogen from the reaction. The fuel cell reactor is preferably a solid oxide fuel cell (SOFC) reactor.