diff --git a/pub/lib/commands.cpp b/pub/lib/commands.cpp
index 95e3107aeef7df465d67e9f34a494895cf78d2fe..f5ee0686053c6ce51a69501dd318588d1919e04b 100644
--- a/pub/lib/commands.cpp
+++ b/pub/lib/commands.cpp
@@ -427,6 +427,7 @@ bool frida_command( string cmd )
             "  mpaf  average, reduce number of points by fixed factor\n"
             "  mpaea average according to error bound (absolute)\n"
             "  mpaer average according to error bound (relative)\n"
+            "  mpbf  break into spectra by fixed factor\n"
             "  mpo   sort\n"
             "  mpq   average when x equal\n"
             "  mpsym symmetrize: map -x -> x, then average\n"
@@ -472,6 +473,8 @@ bool frida_command( string cmd )
         NManip::points_rebin_by_factor();
     } else if (cmd.substr(0,4) == "mpae") {
         NManip::points_rebin_by_err( cmd.substr(4) );
+    } else if (cmd == "mpbf") {
+        NManip::points_break_by_factor();
     } else if (cmd == "mpo") {
         NManip::points_sort();
     } else if (cmd == "mpq") {
diff --git a/pub/lib/manip.cpp b/pub/lib/manip.cpp
index 43040ec5bc2d09fcae5334344fc119be20d81a60..9d0a9f1905af4d04916aa99fb50bf5d88cc6bd21 100644
--- a/pub/lib/manip.cpp
+++ b/pub/lib/manip.cpp
@@ -241,6 +241,42 @@ void NManip::points_rebin_by_err( const string& subcmd )
 }
 
 
+//! Break into spectra, by fixed factor.
+
+void NManip::points_break_by_factor()
+{
+    FileIterator fiter(SFSel::instance()->selD());
+    static int ng;
+    ng = iask( "Number of points per spectrum", ng );
+    if ( ng<1 )
+        throw S("invalid choice");
+
+    while ( const COld *fin = fiter.nextD() ) {
+        POld fout( fin->new_POld() );
+        fout->log_action( "mpbf " + S(ng) );
+        fout->ZCo.push_back( CCoord("no-in-break", ""));
+
+        for ( int j=0; j<fin->nJ(); j++ ) {
+            const CSpec* sin = fin->VS(j);
+            int jsub = 0;
+            for( int i=0; i<sin->size(); i+=ng ){
+                PSpec sout( new CSpec() );
+                sout->z = sin->z;
+                sout->z.push_back( RObjInt( new CObjInt(jsub++) ) );
+                for( int ii=i; ii<sin->size() && ii<i+ng; ++ii ){
+                    if( sin->has_dy() )
+                        sout->push_xyd( sin->x[ii], sin->y[ii], sin->dy[ii] );
+                    else
+                        sout->push_xy( sin->x[ii], sin->y[ii] );
+                }
+                fout->V.push_back( move(sout) );
+            }
+        }
+        SMem::instance()->mem_store( move(fout), fiter.k() );
+    }
+}
+
+
 //! Sort spectrum according to given expression.
 
 void NManip::points_sort()
diff --git a/pub/lib/manip.hpp b/pub/lib/manip.hpp
index 98af48f63bad25c0d131158098ed26b82e3b7208..ab1613482594c99df5d09a1fdfa53631b68b96c0 100644
--- a/pub/lib/manip.hpp
+++ b/pub/lib/manip.hpp
@@ -17,6 +17,7 @@ namespace NManip {
     void points_rebin_by_factor();
     void points_rebin_by_err( const string& subcmd );
     void points_rebin_duplicates();
+    void points_break_by_factor();
     void points_sort();
     void points_symmetrize();
     void points_remove_err();