A sparse approximate inverse technique is introduced to solve general sparse linear systems. The sparse approximate inverse is computed as a factored form and used as a preconditioner to work with some Krylov subspace methods. The new technique 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 the factored inverse are exploited to reduce computational cost. The computation of the factored sparse approximate inverse is relatively cheaper than the techniques based on norm minimization techniques. The new preconditioner possesses much greater inherent parallelism than traditional preconditioners based on incomplete LU factorizations. Numerical experiments are used to show the effectiveness and efficiency of the new sparse approximate inverse preconditioner.