We study a carrier-synchronization scheme for coherent optical communications that uses a feedforward architecture that can be implemented in digital hardware without a phase-locked loop. We derive the equations for maximum a posteriori joint detection of the transmitted symbols and the carrier phase. The result is a multidimensional optimization problem that we approximate with a two-stage iterative algorithm: The first stage is a symbol-by-symbol soft detector of the carrier phase, and the second stage is a hard-decision phase estimator that uses prior and subsequent soft-phase decisions to obtain a minimum mean-square-error phase estimate by exploiting the temporal correlation in the phase-noise process. The received symbols are then derotated by the hard-decision phase estimates, and maximum- likelihood sequence detection of the symbols follows. As each component in the carrier-recovery unit can be separately optimized, the resulting system is highly flexible. We show that the optimum hard-decision phase estimator is a linear filter whose impulse response consists of a causal and an anticausal exponential sequence, which we can truncate and implement as an finite-impulse- response filter. We derive equations for the phase-error variance and the system bit-error ratio (BER). Our results show that 4, 8, and 16 quadrature-amplitude-modulation (QAM) transmissions at 1 dB above sensitivity for BER = 10 <sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">-3</sup> is possible with laser beat linewidths of DeltanuT <sub xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">b</sub> = 1.3 X 10 <sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">-4</sup> , 1.3 X 10 <sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">-4</sup> , and 1.5 x 10 <sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">5</sup> when a decision-directed soft-decision phase estimator is employed.