Method for producing a composite from a bipolar plate and a membrane electrode unit for a fuel cell or a fuel cell stack, wherein the bipolar plate comprises two opposite plates and each plate has a cell side and a cooling side, the method comprises the steps: a) arranging the bipolar plate in a die which has a ferromagnetic or magnetic element which partially forms the contact surface for the bipolar plate and is designed to be removable from the die; b) arranging a membrane electrode unit on the side of the bipolar plate opposite the contact surface of the die; c) arranging a second ferromagnetic or magnetic element, which is designed to correspond to the first ferromagnetic or magnetic element in order to be able to exert a magnetic attraction on one another, on the membrane electrode unit in such a way that both ferromagnetic or magnetic elements (28, 30) are at least partially congruent; d) removing membrane electrode unit and bipolar plate fixed to one another by the two ferromagnetic or magnetic elements (28, 30); e) inserting membrane electrode unit and bipolar plate fixed to one another by the two ferromagnetic or magnetic elements (28, 30) into a second die, which, in the closed state, has at least one mould cavity (34, 35) on one side or on both sides of an edge region of the bipolar plate and a second chamber for receiving the two magnetic or ferromagnetic elements (28, 30), wherein the mould cavity (34, 35) and the second chamber are separated from one another; f) injecting a melt of a polymeric sealing material into the at least one mould cavity (34, 35) of the die; g) allowing the melt to solidify; h) demoulding and removing the composite formed in f) and i) if necessary removing the two magnetic or ferromagnetic elements (28, 30). a) arranging the bipolar plate in a die which has a ferromagnetic or magnetic element which partially forms the contact surface for the bipolar plate and is designed to be removable from the die; b) arranging a membrane electrode unit on the side of the bipolar plate opposite the contact surface of the die; c) arranging a second ferromagnetic or magnetic element, which is designed to correspond to the first ferromagnetic or magnetic element in order to be able to exert a magnetic attraction on one another, on the membrane electrode unit in such a way that both ferromagnetic or magnetic elements (28, 30) are at least partially congruent; d) removing membrane electrode unit and bipolar plate fixed to one another by the two ferromagnetic or magnetic elements (28, 30); e) inserting membrane electrode unit and bipolar plate fixed to one another by the two ferromagnetic or magnetic elements (28, 30) into a second die, which, in the closed state, has at least one mould cavity (34, 35) on one side or on both sides of an edge region of the bipolar plate and a second chamber for receiving the two magnetic or ferromagnetic elements (28, 30), wherein the mould cavity (34, 35) and the second chamber are separated from one another; f) injecting a melt of a polymeric sealing material into the at least one mould cavity (34, 35) of the die; g) allowing the melt to solidify; h) demoulding and removing the composite formed in f) and i) if necessary removing the two magnetic or ferromagnetic elements (28, 30).