Synthesis of nth-order dynamic systems with time-varying delay in the control loop is considered in this paper. First-order Padé approximation is sought to solve the infinite-dimensional problem of the pure delay. Although the approximation describes the problem in a finite-dimensional state space, it poses internal dynamics instability inherited from the resulted non-minimum phase system. The unstable internal dynamics restricts the system closed-loop bandwidth and leads to an imperfect tracking performance. To circumvent this problem, the overall system dynamics is explored in terms of unstable internal dynamics and input/output pairs. The system internal dynamics is used to design a parameter-varying dynamic compensator which stabilizes the internal dynamics based on a desired tracking error profile. The presented dynamic compensator is used to develop a dynamic controller whose parameter-varying gains are explicitly determined in a systematic and straightforward manner. The proposed approach is used to design a controller for a spark ignition lean-burn engine with large time-varying delay in the control loop. The results are demonstrated against a baseline PI controller combined with a parameter-varying Smith predictor to compensate for the time-varying delay.