A controller for an engine, wherein the engine includes: a cylinder; intake ports (16, 17) connected to the cylinder; intake valves that respectively correspond to the intake ports (16, 17), each of the intake valves being configured to selectively allow for and block connection between the corresponding one of the intake ports (16, 17) and the cylinder; and water injection valves (18, 19) installed in the respective intake ports (16, 17), each of the water injection valves (18, 19) being configured to inject water to the corresponding one of the intake ports (16, 17), the controller is configured to selectively execute, for each of the intake ports (16, 17), a synchronous injection that causes the corresponding one of the water injection valves (18, 19) to inject water only during a valve opening period of the corresponding one of the intake valves or an asynchronous injection that causes the corresponding one of the water injection valves (18, 19) to inject water during a valve closing period of the corresponding one of the intake valves, characterised in that the controller is configured to perform, when executing a synchronous and asynchronous concurrent injection in which the intake ports (16, 17) include a first intake port in which the synchronous injection is executed and a second intake port in which the asynchronous injection is executed in a first period of time, a switching process of switching the intake port (16, 17) in which the asynchronous injection is executed in a second period of time. the engine includes: a cylinder; intake ports (16, 17) connected to the cylinder; intake valves that respectively correspond to the intake ports (16, 17), each of the intake valves being configured to selectively allow for and block connection between the corresponding one of the intake ports (16, 17) and the cylinder; and water injection valves (18, 19) installed in the respective intake ports (16, 17), each of the water injection valves (18, 19) being configured to inject water to the corresponding one of the intake ports (16, 17), a cylinder; intake ports (16, 17) connected to the cylinder; intake valves that respectively correspond to the intake ports (16, 17), each of the intake valves being configured to selectively allow for and block connection between the corresponding one of the intake ports (16, 17) and the cylinder; and water injection valves (18, 19) installed in the respective intake ports (16, 17), each of the water injection valves (18, 19) being configured to inject water to the corresponding one of the intake ports (16, 17), the controller is configured to selectively execute, for each of the intake ports (16, 17), a synchronous injection that causes the corresponding one of the water injection valves (18, 19) to inject water only during a valve opening period of the corresponding one of the intake valves or an asynchronous injection that causes the corresponding one of the water injection valves (18, 19) to inject water during a valve closing period of the corresponding one of the intake valves, characterised in that the controller is configured to perform, when executing a synchronous and asynchronous concurrent injection in which the intake ports (16, 17) include a first intake port in which the synchronous injection is executed and a second intake port in which the asynchronous injection is executed in a first period of time, a switching process of switching the intake port (16, 17) in which the asynchronous injection is executed in a second period of time.