An engine comprising: a crankcase; a crankshaft at least a portion of which is housed in the crankcase and which rotates around an axis of the crankshaft; a generator with motor function including a rotor fixed to the crankshaft and a stator fixed to the crankcase while the crankshaft passes through the stator; and an oil pump housed in the crankcase and connected to the crankshaft, wherein the crankshaft includes: a first shaft portion extending one way in an axial direction of the crankshaft from an inside of the crankcase toward an outside of the crankcase, the first shaft portion being fixed to the rotor; and a second shaft portion extending the other way in the axial direction from the inside of the crankcase toward the outside of the crankcase, the second shaft portion being connected to the oil pump; the crankcase includes: a crankcase body including a first side wall through which the first shaft portion passes, and a second side wall through which the second shaft portion is disposed, the second side wall including an opening portion communicated with a housing space for the oil pump; and an oil pump cover through which the second shaft portion passes, the oil pump cover closing the opening portion of the second side wall; and the stator is fixed to the first side wall. a crankcase; a crankshaft at least a portion of which is housed in the crankcase and which rotates around an axis of the crankshaft; a generator with motor function including a rotor fixed to the crankshaft and a stator fixed to the crankcase while the crankshaft passes through the stator; and an oil pump housed in the crankcase and connected to the crankshaft, wherein the crankshaft includes: a first shaft portion extending one way in an axial direction of the crankshaft from an inside of the crankcase toward an outside of the crankcase, the first shaft portion being fixed to the rotor; and a second shaft portion extending the other way in the axial direction from the inside of the crankcase toward the outside of the crankcase, the second shaft portion being connected to the oil pump; the crankcase includes: a crankcase body including a first side wall through which the first shaft portion passes, and a second side wall through which the second shaft portion is disposed, the second side wall including an opening portion communicated with a housing space for the oil pump; and an oil pump cover through which the second shaft portion passes, the oil pump cover closing the opening portion of the second side wall; and the stator is fixed to the first side wall. a first shaft portion extending one way in an axial direction of the crankshaft from an inside of the crankcase toward an outside of the crankcase, the first shaft portion being fixed to the rotor; and a second shaft portion extending the other way in the axial direction from the inside of the crankcase toward the outside of the crankcase, the second shaft portion being connected to the oil pump; the crankcase includes: a crankcase body including a first side wall through which the first shaft portion passes, and a second side wall through which the second shaft portion is disposed, the second side wall including an opening portion communicated with a housing space for the oil pump; and an oil pump cover through which the second shaft portion passes, the oil pump cover closing the opening portion of the second side wall; and the stator is fixed to the first side wall. a crankcase body including a first side wall through which the first shaft portion passes, and a second side wall through which the second shaft portion is disposed, the second side wall including an opening portion communicated with a housing space for the oil pump; and an oil pump cover through which the second shaft portion passes, the oil pump cover closing the opening portion of the second side wall; and the stator is fixed to the first side wall.