A factored sparse approximate inverse is computed and used as a preconditioner for solving general sparse matrices. The algorithm is derived from a matrix decomposition algorithm for inverting dense nonsymmetric matrices. Several strategies and special data structures are proposed to implement the algorithm efficiently. Sparsity patterns of the factored inverse are exploited to reduce computational cost. The preconditioner possesses greater inherent parallelism than traditional preconditioners based on incomplete LU factorizations. Numerical experiments are used to show the effectiveness and efficiency of the proposed sparse approximate inverse preconditioner.