This study focuses on the effect of spatial non-uniformity in the ambient flow on the forces acting on a spherical particle at moderate particle Reynolds numbers. A scaling analysis is performed to obtain conditions under which such effects are important. A direct numerical simulation, based on spectral methods, is used to compute the three-dimensional time-dependent flow past a stationary sphere subject to a uniform flow plus a planar straining flow. The particle Reynolds number, Re, in the range 10 to 300 covering different flow regimes, from unseparated flow to unsteady vortex shedding, is considered. A variety of strain magnitudes and orientations are investigated. A systematic comparison with the potential flow results and axisymmetric strain results is given. Under elongational strain, both the planar and axisymmetric cases are found to stabilize the sphere wake and delay the onset of unsteadiness, while compressional strain leads to instability. In terms of separation angles, length of the recirculation eddy and topology of the surface streamlines, planar and axisymmetric strains yield nearly the same results. The drag force appears to have a linear relation with strain magnitude in both cases, as predicted by the potential flow. However, contrary to the potential flow results, the drag in planar strain is higher than that in axisymmetric strain. The generation of higher drag is explained using the surface pressure and vorticity distributions. Planar strain oriented at an angle with the oncoming uniform flow is observed to break the symmetry of the wake and results in a lift or side force. The variation of the drag and lift forces may be quite complex, and unlike the potential flow results they may not be monotonic with strain magnitude. The direction of the lift force may be opposite to that predicted by the inviscid and low Reynolds number (Re [Lt ] 1) theories. This behaviour is dictated by the presence or absence of a recirculation eddy. In the absence of a recirculation region at low Reynolds numbers (Re < 20), or at a very high strain magnitude when the recirculation region is suppressed, the results follow somewhat the pattern observed in potential flow. However, with the presence of a recirculation region, results opposite to those predicted by the potential theory are observed.